-
Notifications
You must be signed in to change notification settings - Fork 24
85 lines (72 loc) · 2.36 KB
/
develop_pr_check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
## 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/'