Bump junit5.version from 5.12.0 to 5.12.1 #86
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/build-rust.yml' | |
- 'rust-aoc/**' | |
env: | |
# Disable incremental compilation for faster from-scratch builds | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
run: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
type: ['', '--release'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get private repo | |
uses: actions/checkout@v4 | |
with: | |
repository: alien11689/advent-of-code | |
ref: master | |
token: ${{ secrets.ADVENT_OF_CODE_PAT}} | |
path: private | |
- name: Get files | |
run: | | |
mkdir -p rust-aoc/resources/2015 rust-aoc/resources/2023 rust-aoc/resources/2024 | |
cp -r private/2015/src/main/resources/* rust-aoc/resources/2015 | |
cp -r private/2023/src/main/resources/* rust-aoc/resources/2023 | |
cp -r private/2024/src/main/resources/* rust-aoc/resources/2024 | |
- name: Rust update | |
run: rustup update | |
- name: Test | |
run: | | |
cd rust-aoc | |
cargo test | |
- name: Run | |
run: | | |
cd rust-aoc | |
echo '```' > out | |
cargo run ${{matrix.type}} >> out | |
echo '```' >> out | |
cat out >> "$GITHUB_STEP_SUMMARY" | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get private repo | |
uses: actions/checkout@v4 | |
with: | |
repository: alien11689/advent-of-code | |
ref: master | |
token: ${{ secrets.ADVENT_OF_CODE_PAT}} | |
path: private | |
- name: Get files | |
run: | | |
mkdir -p rust-aoc/resources/2015 rust-aoc/resources/2023 rust-aoc/resources/2024 | |
cp -r private/2015/src/main/resources/* rust-aoc/resources/2015 | |
cp -r private/2023/src/main/resources/* rust-aoc/resources/2023 | |
cp -r private/2024/src/main/resources/* rust-aoc/resources/2024 | |
- name: Rust update | |
run: rustup update | |
- name: Install coverage tool | |
run: cargo install cargo-tarpaulin | |
- name: Gather coverage | |
run: | | |
cd rust-aoc | |
cargo tarpaulin -o Lcov | |
- name: Upload coverage | |
uses: codecov/codecov-action@v5 | |
with: | |
fail_ci_if_error: true | |
files: rust-aoc/lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} |