From 8b5947e24fb05716556b59191bf229e3420a313f Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 15 Jul 2023 18:55:10 -0400 Subject: [PATCH] CI: Update GitHub Actions config for uniformity 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 https://github.com/pelias/pelias/issues/951) --- .github/workflows/_test.yml | 2 +- .github/workflows/push.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index 668608d..1d647a2 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -6,7 +6,7 @@ jobs: strategy: matrix: os: - - ubuntu-20.04 + - ${{ vars.UBUNTU_VERSION }} node-version: - 12.x - 14.x diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index fc5664f..6c8fc07 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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 @@ -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