2
2
3
3
on :
4
4
push :
5
- branches : [ master ]
5
+ branches : [master]
6
6
pull_request :
7
7
8
8
env :
@@ -36,33 +36,33 @@ jobs:
36
36
- 5432:5432
37
37
38
38
steps :
39
- - uses : actions/checkout@v2
39
+ - uses : actions/checkout@v2
40
40
41
- - name : Cache cargo registry
42
- uses : actions/cache@v2
43
- with :
44
- path : |
45
- ~/.cargo/git
46
- ~/.cargo/registry/cache
47
- ~/.cargo/registry/index
48
- ./atcoder-problems-backend/target
49
- key : ${{ runner.os }}-cargo-${{ hashFiles('atcoder-problems-backend/Cargo.lock') }}
41
+ - name : Cache cargo registry
42
+ uses : actions/cache@v2
43
+ with :
44
+ path : |
45
+ ~/.cargo/git
46
+ ~/.cargo/registry/cache
47
+ ~/.cargo/registry/index
48
+ ./atcoder-problems-backend/target
49
+ key : ${{ runner.os }}-cargo-${{ hashFiles('atcoder-problems-backend/Cargo.lock') }}
50
50
51
- - name : Setup Postgresql
52
- run : psql ${SQL_URL} < ../config/database-definition.sql
51
+ - name : Setup Postgresql
52
+ run : psql ${SQL_URL} < ../config/database-definition.sql
53
53
54
- - name : Setup
55
- run : rustup component add rustfmt
54
+ - name : Setup
55
+ run : rustup component add rustfmt
56
56
57
- - name : Check format
58
- run : cargo fmt --all -- --check
57
+ - name : Check format
58
+ run : cargo fmt --all -- --check
59
59
60
- - name : Build
61
- run : cargo build --verbose
60
+ - name : Build
61
+ run : cargo build --verbose
62
+
63
+ - name : Run tests
64
+ run : cargo test --verbose --workspace -- --test-threads=1
62
65
63
- - name : Run tests
64
- run : cargo test --verbose --workspace -- --test-threads=1
65
-
66
66
frontend_test :
67
67
name : Run frontend tests
68
68
runs-on : ubuntu-latest
@@ -71,28 +71,28 @@ jobs:
71
71
working-directory : ./atcoder-problems-frontend
72
72
73
73
steps :
74
- - uses : actions/checkout@v2
75
- - name : Use Node.js
76
- uses : actions/setup-node@v1
74
+ - uses : actions/checkout@v2
75
+ - name : Use Node.js
76
+ uses : actions/setup-node@v1
77
77
78
- - name : Cache node_modules
79
- uses : actions/cache@v2
80
- with :
81
- path : |
82
- ~/.cache/Cypress
83
- ./atcoder-problems-frontend/node_modules
84
- key : ${{ runner.os }}-cargo-${{ hashFiles('atcoder-problems-frontend/yarn.lock') }}
78
+ - name : Cache node_modules
79
+ uses : actions/cache@v2
80
+ with :
81
+ path : |
82
+ ~/.cache/Cypress
83
+ ./atcoder-problems-frontend/node_modules
84
+ key : ${{ runner.os }}-cargo-${{ hashFiles('atcoder-problems-frontend/yarn.lock') }}
85
85
86
- - name : Install dependencies
87
- run : yarn
88
- - name : build
89
- run : yarn build
90
- - name : test
91
- run : yarn test
92
- - name : lint
93
- run : yarn lint
94
- - name : Integration test
95
- run : |
96
- yarn prepare-ci
97
- yarn start:ci &
98
- yarn cy:run
86
+ - name : Install dependencies
87
+ run : yarn
88
+ - name : build
89
+ run : yarn build
90
+ - name : test
91
+ run : yarn test
92
+ - name : lint
93
+ run : yarn lint
94
+ - name : Integration test
95
+ run : |
96
+ yarn prepare-ci
97
+ yarn start:ci &
98
+ yarn cy:run
0 commit comments