Skip to content

Commit 85df127

Browse files
committed
chore: Add CI workflow for clean, build, and test
1 parent 4c3901f commit 85df127

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/CI.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
clean:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Rust
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
toolchain: stable
22+
23+
- name: Run clean script
24+
run: ./clean.sh
25+
26+
build-and-test:
27+
needs: clean
28+
runs-on: ubuntu-latest
29+
strategy:
30+
matrix:
31+
module:
32+
- Module00
33+
- Module01/error
34+
- Module01/SimpleCalc
35+
- Module01/Todo
36+
# - Module02/auth_server
37+
- Module02/Chatbot
38+
- Module02/gitCheck
39+
- Module02/Web1
40+
- Module02/Web2
41+
# - Module03/zip_cracker
42+
steps:
43+
- name: Checkout code
44+
uses: actions/checkout@v2
45+
46+
- name: Set up Rust
47+
uses: actions-rs/toolchain@v1
48+
with:
49+
toolchain: stable
50+
51+
- name: Build and test
52+
working-directory: ${{ matrix.module }}
53+
run: |
54+
cargo build --verbose
55+
cargo test --verbose

0 commit comments

Comments
 (0)