From 4454bae45334f001f2d9c52e0a1d55800b69c6a2 Mon Sep 17 00:00:00 2001 From: Timid Robot Zehta Date: Thu, 11 Apr 2024 15:37:03 -0700 Subject: [PATCH 1/4] remove unused GitHub action (better now to do manual publishes) --- .github/workflows/pull_request.yml | 36 ------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 .github/workflows/pull_request.yml diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml deleted file mode 100644 index 03b86efbb..000000000 --- a/.github/workflows/pull_request.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Publish - -on: - push: - branches: - - master - -jobs: - Deploy: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - - name: Run npm install - run: npm ci - - - name: Build - run: | - npm run build - - - name: Commit changes - uses: EndBug/add-and-commit@v4 - with: - author_name: cc-open-source-bot - author_email: opensource@creativecommons.org - message: "Deploy site" - add: "./docs" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 78a7807933ea803a09849304025071f6acc3ac2c Mon Sep 17 00:00:00 2001 From: Timid Robot Zehta Date: Thu, 11 Apr 2024 15:37:27 -0700 Subject: [PATCH 2/4] rename to match function --- .github/workflows/{push.yml => lint_and_test.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{push.yml => lint_and_test.yml} (100%) diff --git a/.github/workflows/push.yml b/.github/workflows/lint_and_test.yml similarity index 100% rename from .github/workflows/push.yml rename to .github/workflows/lint_and_test.yml From 4fdf949de1125edb35ffc20e7863df23370cba80 Mon Sep 17 00:00:00 2001 From: Timid Robot Zehta Date: Thu, 11 Apr 2024 15:43:09 -0700 Subject: [PATCH 3/4] update lint and test GitHub Action workflow - update actions to latest versions - use Node 14 instead of 12 - use 2 spaces instead of 4 --- .github/workflows/lint_and_test.yml | 62 ++++++++++++++++------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml index 4d17cd57f..f8ec6cbce 100644 --- a/.github/workflows/lint_and_test.yml +++ b/.github/workflows/lint_and_test.yml @@ -1,31 +1,39 @@ name: Lint and Test -on: pull_request +on: + pull_request: + push: + workflow_dispatch: jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - name: Run npm install - run: npm ci - - - name: Lint - run: npm run lint - - - name: Test - run: npm run test:unit - env: - CI: true - - name: Cypress run - uses: cypress-io/github-action@v5.1.0 - with: - start: npm run serve - wait-on: 'http://localhost:8080' + build: + runs-on: ubuntu-latest + + steps: + # https://github.com/actions/checkout + - name: Checkout + uses: actions/checkout@v4 + + # https://github.com/actions/setup-node + - name: Use Node.js 14 + uses: actions/setup-node@v4 + with: + node-version: '14' + + - name: Clean install NPM packages from package-lock.json + run: npm ci + + - name: Lint + run: npm run lint + + - name: Test + run: npm run test:unit + env: + CI: true + + # https://github.com/cypress-io/github-action + - name: Cypress run + uses: cypress-io/github-action@v6 + with: + start: npm run serve + wait-on: 'http://localhost:8080' From 1e231b58dd9b26dd87cd876277e67e6ac44130d4 Mon Sep 17 00:00:00 2001 From: Timid Robot Zehta Date: Thu, 11 Apr 2024 15:51:59 -0700 Subject: [PATCH 4/4] remove duplicating event: pull_request --- .github/workflows/lint_and_test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml index f8ec6cbce..bdbb6f9ed 100644 --- a/.github/workflows/lint_and_test.yml +++ b/.github/workflows/lint_and_test.yml @@ -1,7 +1,6 @@ name: Lint and Test on: - pull_request: push: workflow_dispatch: