Skip to content

Commit

Permalink
Merge pull request #479 from pelias/improve-github-actions
Browse files Browse the repository at this point in the history
Improve GitHub actions configuration
  • Loading branch information
orangejulius authored Sep 23, 2021
2 parents 7eca249 + 5dde9b2 commit d95d6f7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
12 changes: 0 additions & 12 deletions .circleci/config.yml

This file was deleted.

30 changes: 21 additions & 9 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, ubuntu-18.04]
node-version: [10.x, 12.x]
os: [ubuntu-20.04]
node-version: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Install node.js ${{ matrix.node-version }}
Expand All @@ -26,8 +26,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04]
node-version: [10.x, 12.x]
os: [ubuntu-20.04]
node-version: [12.x, 14.x, 16.x]
es-version: [7.6.1]
jdk-version: [oraclejdk11]
steps:
Expand All @@ -51,18 +51,30 @@ jobs:
npm-publish:
needs: [unit-tests, integration-tests]
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install node.js 12.x
- name: Install Node.js
uses: actions/setup-node@v2-beta
with:
node-version: 12.x
node-version: 16.x
- name: Run semantic-release
env:
GH_TOKEN: ${{ secrets.GH_SEMANTIC_RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm install -g npm
npm install --production
curl "https://raw.githubusercontent.com/pelias/ci-tools/master/semantic-release.sh" | bash -
build-docker-images:
# run this job if the unit tests passed and the npm-publish job was a success or was skipped
# 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, integration-tests, npm-publish]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build Docker images
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
curl "https://raw.githubusercontent.com/pelias/ci-tools/master/build-docker-images.sh" | bash -
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,4 @@ $ docker run --rm --name elastic-test -p 9200:9200 pelias/elasticsearch:7.5.1

### Continuous Integration

Travis tests every release against all supported Node.js versions.
CI tests every release against all supported Node.js versions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"create_index": "./bin/create_index",
"drop_index": "node scripts/drop_index",
"reset_type": "node scripts/reset_type",
"update_settings": "node scripts/update_settings",
"travis": "npm run test && npm run integration"
"update_settings": "node scripts/update_settings"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit d95d6f7

Please sign in to comment.