From 29e7e5e06e243b1ca833a335c7c5729ad010edd6 Mon Sep 17 00:00:00 2001 From: Jelle van Snik Date: Mon, 2 May 2022 15:59:11 +0200 Subject: [PATCH] add testing workflow --- .../{build-deploy.yml => deploying.yml} | 10 ++----- .github/workflows/linting.yml | 2 +- .github/workflows/testing.yml | 30 +++++++++++++++++++ 3 files changed, 34 insertions(+), 8 deletions(-) rename .github/workflows/{build-deploy.yml => deploying.yml} (86%) create mode 100644 .github/workflows/testing.yml diff --git a/.github/workflows/build-deploy.yml b/.github/workflows/deploying.yml similarity index 86% rename from .github/workflows/build-deploy.yml rename to .github/workflows/deploying.yml index 9a439786..72b13f47 100644 --- a/.github/workflows/build-deploy.yml +++ b/.github/workflows/deploying.yml @@ -1,12 +1,9 @@ -name: Build & deploy +name: Deploying on: push: branches: - master - pull_request: - branches: - - master jobs: build: @@ -33,12 +30,11 @@ jobs: with: name: production-files path: ./build - + deploy: name: Deploy needs: build runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' steps: - name: Download artifact @@ -52,4 +48,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build - cname: movie.squeezebox.dev \ No newline at end of file + cname: movie.squeezebox.dev diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 1cad5448..d20b77e7 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -34,6 +34,6 @@ jobs: uses: wearerequired/lint-action@v2 with: eslint: true - eslint_args: src + eslint_args: --max-warnings=0 src eslint_extensions: tsx,ts eslint_auto_fix: false \ No newline at end of file diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 00000000..9373ee7d --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,30 @@ +name: Testing + +on: + push: + branches: + - next + pull_request: + types: [opened, reopened] + +permissions: read-all + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Node.js + uses: actions/setup-node@v1 + with: + node-version: 16 + + - name: Install Yarn packages + run: yarn install + + - name: Build project + run: yarn build