ci: fix CI error #110
Workflow file for this run
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: main | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [^18, ^20] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup MongoDB | |
run: bash ./.github/mongo_setup.sh | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Dependency | |
run: yarn install --ignore-engines | |
- name: Build library | |
run: yarn run build | |
- name: Run unit tests | |
run: yarn run tests | |
coverall: | |
needs: [test] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [^18, ^20] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup MongoDB | |
run: bash ./.github/mongo_setup.sh | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Dependency | |
run: yarn install --ignore-engines | |
- name: Build library | |
run: yarn run build | |
- name: Run code coverage | |
run: yarn run coverage | |
- name: Coveralls Parallel | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
release: | |
needs: [test,coverall] | |
if: github.event_name == 'push' && github.repository == 'node-casbin/mongoose-adapter' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Install Dependency | |
run: yarn install --ignore-engines | |
- name: Build library | |
run: yarn run build | |
- name: Release | |
run: npx -p semantic-release -p @semantic-release/git -p @semantic-release/changelog -p @semantic-release/commit-analyzer -p @semantic-release/release-notes-generator -p @semantic-release/release-notes-generator -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/github semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |