-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 and integration tests are moved to separate files for reuse - a new pull request workflow is added that only runs on external forks, and runs unit/integration tests - Ubuntu versions are now pulled from a GitHub Actions variable (see pelias/pelias#951)
- Loading branch information
1 parent
d547f3a
commit c9790c2
Showing
4 changed files
with
66 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Integration Tests | ||
on: workflow_call | ||
jobs: | ||
integration-tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ${{ vars.UBUNTU_VERSION }} | ||
node-version: [14.x, 16.x] | ||
es-version: [7.6.1] | ||
jdk-version: [oraclejdk11] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Start elasticsearch ${{ matrix.es-version }} (${{ matrix.jdk-version }}) | ||
env: | ||
ES_VERSION: ${{ matrix.es-version }} | ||
JDK_VERSION: ${{ matrix.jdk-version }} | ||
run: ./scripts/setup_ci.sh | ||
- name: Run integration tests | ||
run: | | ||
npm install -g npm | ||
npm install | ||
curl http://127.0.0.1:9200/ | ||
./bin/create_index | ||
npm run integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Unit Tests | ||
on: workflow_call | ||
jobs: | ||
unit-tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ${{ vars.UBUNTU_VERSION }} | ||
node-version: [14.x, 16.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2-beta | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Run unit tests | ||
run: | | ||
npm install -g npm | ||
npm install | ||
npm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Continuous Integration | ||
on: pull_request | ||
jobs: | ||
unit-tests: | ||
# only run this job for forks | ||
if: github.event.pull_request.head.repo.full_name != github.repository | ||
uses: ./.github/workflows/_unit_tests.yml | ||
integration-tests: | ||
# only run this job for forks | ||
if: github.event.pull_request.head.repo.full_name != github.repository | ||
uses: ./.github/workflows/_integration_tests.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters