Skip to content

Commit

Permalink
CI: Update GitHub Actions config for uniformity
Browse files Browse the repository at this point in the history
This updates CI configuration for this repo with the following changes:
- the core configuration for running unit tests is moved to _test.yml so it
  can be shared
- a new pull request workflow is added that only runs on external forks, and runs unit tests
- Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
  • Loading branch information
orangejulius committed Jul 15, 2023
1 parent 83b64de commit 8b5947e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
os:
- ubuntu-20.04
- ${{ vars.UBUNTU_VERSION }}
node-version:
- 12.x
- 14.x
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
npm-publish:
needs: unit-tests
if: github.ref == 'refs/heads/master' && needs.unit-tests.result == 'success'
runs-on: ubuntu-20.04
runs-on: ${{ vars.UBUNTU_VERSION }}
steps:
- uses: actions/checkout@v2
- name: Install Node.js
Expand All @@ -26,7 +26,7 @@ jobs:
# note: github actions won't run a job if you don't call one of the status check functions, so `always()` is called since it evalutes to `true`
if: ${{ always() && needs.unit-tests.result == 'success' && (needs.npm-publish.result == 'success' || needs.npm-publish.result == 'skipped') }}
needs: [unit-tests, npm-publish]
runs-on: ubuntu-20.04
runs-on: ${{ vars.UBUNTU_VERSION }}
steps:
- uses: actions/checkout@v2
- name: Build Docker images
Expand Down

0 comments on commit 8b5947e

Please sign in to comment.