Skip to content

Commit

Permalink
Merge pull request #1621 from eqlabs/ci
Browse files Browse the repository at this point in the history
ci: periodically refresh cache
  • Loading branch information
Mirko-von-Leipzig committed Dec 6, 2023
2 parents f3e4799 + 5fc60d9 commit 39a9aee
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
branches: [main]
pull_request:
branches: [main]
# Daily cron job used to clear and rebuild cache (https://github.com/Swatinem/rust-cache/issues/181).
schedule:
- cron: '0 0 * * *'

# Limits workflow concurrency to only the latest commit in the PR.
concurrency:
Expand Down Expand Up @@ -36,8 +39,15 @@ jobs:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- uses: Noelware/[email protected]
- uses: taiki-e/install-action@nextest
- name: Clear cache
if: github.event_name =='schedule'
run: |
cargo clean
rm -rf ~/.cargo/registry
rm -rf ~/.cargo/git
- name: Compile unit tests
run: cargo nextest run --all-targets --all-features --workspace --locked --no-run --timings
# --build-jobs 1 as we are constantly OOMing during compilation.
run: cargo nextest run --all-targets --all-features --workspace --locked --no-run --timings --build-jobs 1
- name: Run unit tests
run: timeout 10m cargo nextest run --no-fail-fast --all-targets --all-features --workspace --locked
- name: Store timings
Expand All @@ -58,6 +68,12 @@ jobs:
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- uses: Noelware/[email protected]
- name: Clear cache
if: github.event_name =='schedule'
run: |
cargo clean
rm -rf ~/.cargo/registry
rm -rf ~/.cargo/git
- run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings -D rust_2018_idioms

rustfmt:
Expand All @@ -80,6 +96,9 @@ jobs:
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
- uses: Noelware/[email protected]
- name: Clear cache
if: github.event_name =='schedule'
run: cargo clean
- run: cargo doc --no-deps --document-private-items

dep-sort:
Expand Down

0 comments on commit 39a9aee

Please sign in to comment.