Skip to content

Commit aa0fa9e

Browse files
CI pipeline for Rust method
1 parent bb4e8b1 commit aa0fa9e

2 files changed

Lines changed: 46 additions & 3 deletions

File tree

.github/workflows/CI-testing-C-method.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: Run Tests on Implementation
1+
name: Run Tests on Implementation in C
22

33
on:
44
push:
55
branches: main
6-
paths: ["C-method/**", "tests/**"]
6+
paths: ["C-method/**", "tests/**", ".github/workflows/**"]
77
pull_request:
88
branches: main
9-
paths: ["C-method/**", "tests/**"]
9+
paths: ["C-method/**", "tests/**", ".github/workflows/**"]
1010

1111
jobs:
1212
test:
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Run Tests on Implementation in Rust
2+
3+
on:
4+
push:
5+
branches: main
6+
paths: ["rust-method/**", "tests/**", ".github/workflows/**"]
7+
pull_request:
8+
branches: main
9+
paths: ["rust-method/**", "tests/**", ".github/workflows/**"]
10+
11+
12+
jobs:
13+
tests:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
- name: Install Rust 🦀 (stable)
20+
# actions-rs/toolchain@v1 is now deprecated
21+
uses: dtolnay/rust-toolchain@stable
22+
23+
- name: Install Python
24+
run: |
25+
sudo apt update
26+
sudo apt install -y python3
27+
28+
29+
- name: Run tests on implementation
30+
working-directory: ./rust-method
31+
run: |
32+
python3 checker.py | tee test_results.txt
33+
34+
- name: Upload test logs as artifacts
35+
if: always()
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: checker-logs
39+
path: |
40+
./rust-method/tests_results.txt
41+
# Without `*` globbing, folders files will not be uploaded
42+
tests/output-rust-method/*
43+
retention-days: 5

0 commit comments

Comments
 (0)