Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

Run direct-minimal-versions tests on a weekly basis #78

Merged
merged 1 commit into from
May 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions .github/cue/rust.cue
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,7 @@ rust: _#useMergeQueue & {
_#checkoutCode,
_#installRust,
_#cacheRust & {with: "shared-key": "stable-${{ matrix.platform }}"},
_#installTool & {with: tool: "cargo-nextest"},
{
name: "Compile tests"
run: "cargo test --locked --no-run"
},
{
name: "Run tests"
run: "cargo nextest run --locked"
},
{
name: "Run doctests"
run: "cargo test --locked --doc"
},
for step in _testRust {step},
]
}

Expand Down
44 changes: 44 additions & 0 deletions .github/cue/scheduled.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
package workflows

scheduled: {
name: "scheduled"

on: {
// Run every Monday at 7:45am UTC.
schedule: [{cron: "45 7 * * 1"}]

// Allow manually running this workflow.
workflow_dispatch: null
}

concurrency: {
group: "${{ github.workflow }}-${{ github.ref }}"
"cancel-in-progress": true
}

env: {
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: "always"
RUST_BACKTRACE: 1
RUSTFLAGS: "-D warnings"
}

jobs: direct_minimal_versions: {
name: "direct-minimal-versions / stable"
"runs-on": defaultRunner
steps: [
_#checkoutCode & {with: ref: defaultBranch},
_#installRust,
_#installRust & {with: toolchain: "nightly"},
{
name: "Default to stable Rust"
run: "rustup default stable"
},
{
name: "Resolve minimal dependency versions instead of maximum"
run: "cargo +nightly update -Z direct-minimal-versions"
},
for step in _testRust {step},
]
}
}
16 changes: 16 additions & 0 deletions .github/cue/shared-steps.cue
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,19 @@ _#prettier: _#step & {
uses: "creyD/prettier_action@31355f8eef017f8aeba2e0bc09d8502b13dbbad1"
with: prettier_version: "2.8.8"
}

_testRust: [
_#installTool & {with: tool: "cargo-nextest"},
_#step & {
name: "Compile tests"
run: "cargo test --locked --no-run"
},
_#step & {
name: "Run tests"
run: "cargo nextest run --locked --all-targets --all-features"
},
_#step & {
name: "Run doctests"
run: "cargo test --locked --doc"
},
]
1 change: 1 addition & 0 deletions .github/cue/workflows.cue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ workflows: [
{workflow: githubPages},
{workflow: preloadCaches},
{workflow: rust},
{workflow: scheduled},
{workflow: wordsmith},
]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
- name: Compile tests
run: cargo test --locked --no-run
- name: Run tests
run: cargo nextest run --locked
run: cargo nextest run --locked --all-targets --all-features
- name: Run doctests
run: cargo test --locked --doc
check_msrv:
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This file is generated by .github/cue/ci_tool.cue; DO NOT EDIT!

name: scheduled
"on":
schedule:
- cron: 45 7 * * 1
workflow_dispatch: null
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTFLAGS: -D warnings
jobs:
direct_minimal_versions:
name: direct-minimal-versions / stable
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
ref: main
- name: Install stable Rust toolchain
uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d
with:
toolchain: stable
- name: Install nightly Rust toolchain
uses: dtolnay/rust-toolchain@b44cb146d03e8d870c57ab64b80f04586349ca5d
with:
toolchain: nightly
- name: Default to stable Rust
run: rustup default stable
- name: Resolve minimal dependency versions instead of maximum
run: cargo +nightly update -Z direct-minimal-versions
- name: Install cargo-nextest
uses: taiki-e/install-action@a775aaf2e8ed709f76ee019cb77e39fc50613631
with:
tool: cargo-nextest
- name: Compile tests
run: cargo test --locked --no-run
- name: Run tests
run: cargo nextest run --locked --all-targets --all-features
- name: Run doctests
run: cargo test --locked --doc