Skip to content

Commit 6d5944b

Browse files
committed
chore(ci): fix paths and arguments for standardized repository structure
1 parent 7d6075e commit 6d5944b

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

.github/workflows/tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ jobs:
3939
# Shared files that trigger all tests
4040
TRIGGER_ALL="^.github/workflows/|^rust/common/|^rust/Cargo.toml|^rust/Cargo.lock|^golang/common/|^justfile"
4141
42-
ALL_RUST_PROJECTS=("rust/2015" "rust/2018" "rust/2019" "rust/2020" "rust/2021" "rust/2022" "rust/2023" "rust/2025" "rust/runner")
43-
ALL_GO_PROJECTS=("golang/2017" "golang/2019" "golang/2020" "golang/2024")
44-
ALL_ZIG_PROJECTS=("zig/2021" "zig/2024")
42+
ALL_RUST_PROJECTS=("2015" "2018" "2019" "2020" "2021" "2022" "2023" "2025" "runner")
43+
ALL_GO_PROJECTS=("2017" "2019" "2020" "2024")
44+
ALL_ZIG_PROJECTS=("2021" "2024")
4545
4646
if echo "$CHANGED_FILES" | grep -qE "$TRIGGER_ALL"; then
4747
RUST_PROJECTS=$(printf '%s\n' "${ALL_RUST_PROJECTS[@]}" | jq -R . | jq -s -c .)
@@ -50,15 +50,15 @@ jobs:
5050
else
5151
RUST_PROJECTS=()
5252
for project in "${ALL_RUST_PROJECTS[@]}"; do
53-
if echo "$CHANGED_FILES" | grep -q "^${project}/"; then RUST_PROJECTS+=("$project"); fi
53+
if echo "$CHANGED_FILES" | grep -q "^rust/${project}/"; then RUST_PROJECTS+=("$project"); fi
5454
done
5555
GO_PROJECTS=()
5656
for project in "${ALL_GO_PROJECTS[@]}"; do
57-
if echo "$CHANGED_FILES" | grep -q "^${project}/"; then GO_PROJECTS+=("$project"); fi
57+
if echo "$CHANGED_FILES" | grep -q "^golang/${project}/"; then GO_PROJECTS+=("$project"); fi
5858
done
5959
ZIG_PROJECTS=()
6060
for project in "${ALL_ZIG_PROJECTS[@]}"; do
61-
if echo "$CHANGED_FILES" | grep -q "^${project}/"; then ZIG_PROJECTS+=("$project"); fi
61+
if echo "$CHANGED_FILES" | grep -q "^zig/${project}/"; then ZIG_PROJECTS+=("$project"); fi
6262
done
6363
6464
RUST_PROJECTS=$(printf '%s\n' "${RUST_PROJECTS[@]}" | jq -R . | jq -s -c .)
@@ -84,7 +84,7 @@ jobs:
8484
uses: dtolnay/rust-toolchain@stable
8585
- name: Install Rust Nightly for 2021/_4
8686
uses: dtolnay/rust-toolchain@nightly
87-
if: ${{ matrix.project == '2021/_4' }}
87+
if: ${{ matrix.project == '2021' }}
8888
- name: Set up cargo-nextest
8989
uses: taiki-e/install-action@nextest
9090
- name: Install just
@@ -93,12 +93,12 @@ jobs:
9393
uses: actions/cache@v4
9494
with:
9595
path: .cache
96-
key: ${{ runner.os }}-rust-cache-${{ hashFiles('**/Cargo.lock', 'aoc-rust-common/src/**') }}-${{ matrix.project }}
96+
key: ${{ runner.os }}-rust-cache-${{ hashFiles('rust/Cargo.lock', 'rust/common/src/**') }}-${{ matrix.project }}
9797
restore-keys: |
9898
${{ runner.os }}-rust-cache-
9999
- name: Run Clippy
100100
run: cargo clippy --workspace -- -A warnings
101-
working-directory: ${{ matrix.project }}
101+
working-directory: rust/
102102
continue-on-error: true
103103
- name: Run Rust tests
104104
run: just test-project-rust ${{ matrix.project }}
@@ -126,7 +126,7 @@ jobs:
126126
uses: actions/cache@v4
127127
with:
128128
path: .cache
129-
key: ${{ runner.os }}-go-cache-${{ hashFiles('**/go.mod', 'aoc-go-common/**') }}-${{ matrix.project }}
129+
key: ${{ runner.os }}-go-cache-${{ hashFiles('golang/**/go.mod', 'golang/common/**') }}-${{ matrix.project }}
130130
restore-keys: |
131131
${{ runner.os }}-go-cache-
132132
- name: Run Go tests

0 commit comments

Comments
 (0)