Skip to content

Commit 3ef83ed

Browse files
committed
Add CI folder
1 parent 0fcabb7 commit 3ef83ed

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/rust.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Test all challenges
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
test:
14+
name: Run tests for each challenge
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Rust
22+
uses: actions-rs/toolchain@v1
23+
with:
24+
toolchain: stable
25+
profile: minimal
26+
override: true
27+
28+
- name: Find Cargo projects
29+
id: find-projects
30+
run: |
31+
projects=$(find challenges/ -name Cargo.toml | xargs dirname)
32+
echo "Found projects:"
33+
echo "$projects"
34+
echo "$projects" > projects_list.txt
35+
36+
- name: Run Cargo tests for each project
37+
run: |
38+
while IFS= read -r project; do
39+
echo "Running tests in $project"
40+
(cd "$project" && cargo test --verbose)
41+
done < projects_list.txt

0 commit comments

Comments
 (0)