From f0f521fce7a7857f9368e5fa96ce2a07370434fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A5l=20Larsen?= Date: Sun, 7 Feb 2021 17:04:54 +0100 Subject: [PATCH 1/3] add a test and build action --- .github/workflows/test-and-build.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/test-and-build.yaml diff --git a/.github/workflows/test-and-build.yaml b/.github/workflows/test-and-build.yaml new file mode 100644 index 0000000..325e56d --- /dev/null +++ b/.github/workflows/test-and-build.yaml @@ -0,0 +1,27 @@ +name: Test and Build + +on: [pull_request, issues] + +jobs: + test-and-build: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-node@v1 + with: + node-version: "12.8.1" + - uses: actions/checkout@v1 + - uses: actions/cache@v1.1.2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + restore-keys: ${{ runner.os }}-node- + - name: Install dependencies + run: npm ci + - name: Run Prettier check + run: npm run prettier-check + - name: Run eslint check + run: npm run eslint-check + - name: Run tests + run: npm run test + - name: Build application + run: npm run build \ No newline at end of file From f907ab5ac302be51d4aaecc399881b4c3fdbc7df Mon Sep 17 00:00:00 2001 From: Martin Skatvedt Date: Wed, 19 May 2021 12:27:57 +0200 Subject: [PATCH 2/3] added newline at the end --- .github/workflows/test-and-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-build.yaml b/.github/workflows/test-and-build.yaml index 325e56d..21c519a 100644 --- a/.github/workflows/test-and-build.yaml +++ b/.github/workflows/test-and-build.yaml @@ -24,4 +24,4 @@ jobs: - name: Run tests run: npm run test - name: Build application - run: npm run build \ No newline at end of file + run: npm run build From 6cfb19c4c374875bc3de3154c76725a4ec86fcc0 Mon Sep 17 00:00:00 2001 From: Martin Skatvedt Date: Wed, 19 May 2021 12:51:50 +0200 Subject: [PATCH 3/3] new workflow config --- .github/workflows/test-and-build.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-and-build.yaml b/.github/workflows/test-and-build.yaml index 21c519a..fd15b72 100644 --- a/.github/workflows/test-and-build.yaml +++ b/.github/workflows/test-and-build.yaml @@ -17,10 +17,10 @@ jobs: restore-keys: ${{ runner.os }}-node- - name: Install dependencies run: npm ci - - name: Run Prettier check - run: npm run prettier-check - - name: Run eslint check - run: npm run eslint-check + - name: Prettier + run: npx --no-install prettier --check . + - name: Check linting + run: npx --no-install eslint . - name: Run tests run: npm run test - name: Build application