fix: e2e test does not stop on github actions #114
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
## This workflow has been disabled for now, because the CKAN API is blocking our requests. | |
## Re-enable when we can package test data inside this repository. | |
name: "PR check for the develop branch" | |
on: | |
pull_request: | |
branches: | |
- develop | |
push: | |
branches: | |
- develop | |
jobs: | |
lint_and_build: | |
runs-on: ubuntu-latest | |
# Set up concurrency so the SQLite cache can be reused between nodejs matrix versions | |
# concurrency: | |
# group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- uses: actions/cache@v4 | |
name: Setup npm cache | |
id: node_modules | |
with: | |
path: | | |
node_modules/ | |
db/download/ | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package.json', '**/test-runner.ts') }} | |
restore-keys: | | |
${{ runner.os }}-npm-${{ hashFiles('**/package.json', '**/test-runner.ts') }} | |
- name: Install dependencies | |
if: steps.node_modules.outputs.cache-hit != 'true' | |
run: | | |
npm install --global yarn | |
yarn install | |
- name: Run eslint | |
uses: sibiraj-s/action-eslint@v3 | |
with: | |
extensions: 'ts' | |
ignore-path: .eslintignore | |
ignore-patterns: | | |
build/ | |
node_modules/ | |
token: ${{ secrets.G_ACTIONS_TOKEN_FOR_PR }} | |
- name: Run tests | |
run: npm run test | |
# system testでビルドを行うので、ここではテストを行わない | |
# - name: build test | |
# shell: bash | |
# run: | | |
# npm run build | |
- name: run e2e test | |
shell: bash | |
run: | | |
npm run test:e2e | |
- name: create test report | |
uses: MishaKav/jest-coverage-comment@main | |
with: | |
github-token: ${{ secrets.G_ACTIONS_TOKEN_FOR_PR }} | |
summary-title: Coverage Summary | |
badge-title: Coverage | |
hide-comment: false | |
create-new-comment: false | |
hide-summary: false | |
coverage-summary-path: ./coverage/coverage-summary.json | |
junitxml-title: JUnit | |
junitxml-path: ./coverage/junit.xml | |
coverage-title: Coverage Details | |
coverage-path: ./coverage/coverage.txt | |
coverage-path-prefix: './src/' |