Merge pull request #190 from jamesfer/update-node-neo4j-test-versions #32
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
name: CI | |
on: push | |
jobs: | |
test: | |
name: Tests (node ${{ matrix.node-version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: | |
- '18' | |
- '20' | |
- '21' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn install --frozen-lockfile | |
- run: yarn lint | |
- run: yarn build | |
- run: yarn test:unit | |
- uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: test-${{ join(matrix.*, '-') }} | |
parallel: true | |
integration-test: | |
name: Integration tests (neo4j ${{ matrix.neo4j }}, node ${{ matrix.node-version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
neo4j: | |
- '4.4' | |
- '5.16' | |
node-version: | |
- '21' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: yarn install --frozen-lockfile | |
- run: yarn test | |
env: | |
NEO4J_VERSION: ${{ matrix.neo4j }} | |
- uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: integration-test-${{ join(matrix.*, '-') }} | |
parallel: true | |
finialize-coverage: | |
name: Finalize coverage | |
needs: | |
- test | |
- integration-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Finalise coverage | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.github_token }} | |
parallel-finished: true | |
deploy: | |
name: Deploy | |
needs: | |
- test | |
- integration-test | |
if: github.ref == 'refs/heads/master' | |
concurrency: | |
group: deploy | |
cancel-in-progress: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- run: yarn install --frozen-lockfile | |
- run: yarn build | |
- run: yarn semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.github_token }} | |
NPM_TOKEN: ${{ secrets.npm_token }} | |
- run: yarn docs | |
- uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.github_token }} | |
publish_dir: docs |