22
33on :
44 push :
5- branches : [ master ]
5+ branches : [master]
66 pull_request :
77
88env :
@@ -36,33 +36,33 @@ jobs:
3636 - 5432:5432
3737
3838 steps :
39- - uses : actions/checkout@v2
39+ - uses : actions/checkout@v2
4040
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') }}
5050
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
5353
54- - name : Setup
55- run : rustup component add rustfmt
54+ - name : Setup
55+ run : rustup component add rustfmt
5656
57- - name : Check format
58- run : cargo fmt --all -- --check
57+ - name : Check format
58+ run : cargo fmt --all -- --check
5959
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
6265
63- - name : Run tests
64- run : cargo test --verbose --workspace -- --test-threads=1
65-
6666 frontend_test :
6767 name : Run frontend tests
6868 runs-on : ubuntu-latest
@@ -71,28 +71,28 @@ jobs:
7171 working-directory : ./atcoder-problems-frontend
7272
7373 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
7777
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') }}
8585
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