README.md: Correct the Minimum Supported Rust Version to 1.48 #27
This file contains 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
# We use `actions-rs` for most of our actions | |
# | |
# This file is for the main tests. clippy & rustfmt are separate workflows | |
on: [push, pull_request] | |
name: Cargo Test | |
env: | |
CARGO_TERM_COLOR: always | |
# has a history of occasional bugs (especially on old versions) | |
# | |
# the ci is free so we might as well use it ;) | |
CARGO_INCREMENTAL: 0 | |
# Tested versions: | |
# 1. stable | |
# 2. nightly | |
# 3. Minimum Supported Rust Version (MSRV) | |
jobs: | |
test: | |
# Only run on PRs if the source branch is on someone else's repo | |
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false # Even if one job fails we still want to see the other ones | |
matrix: | |
rust: | |
# Minimum Supported Rust Version | |
# | |
# This is hardcoded and needs to be in sync with Cargo.toml and the README | |
- 1.49 | |
# A recent version of stable rust that is hardcoded. | |
# | |
# This should be kept as up to date as possible. | |
# | |
# This is used so that clippy & tests are run on a reliable reference point. | |
# If clippy has any warnings, this will fail the build (we run with --deny warnings) | |
- 1.72 | |
# The most recent version of stable rust (automatically updated) | |
# | |
# Sometimes, this is exactly the same as the hardcoded right above. | |
# However sometimes it will be automatically updated to something a little newer. | |
# | |
# If there are new clippy lints in the automatic update that aren't | |
# in the hardcoded versions, they will _NOT_ fail the build. | |
# This is true even if they are set to deny by default (clippy does this for some 'correctness' lints). | |
# They will simply be regular warnings. | |
- stable | |
- nightly | |
# NOTE: Features to test must be specified manually. They are applied to all versions separately. | |
# | |
# This has the advantage of being more flexibile and thorough | |
# This has the disadvantage of being more vebrose | |
# | |
# Specific feature combos can be overridden per-version with 'include' and 'ecclude' | |
features: ["", "nested-values", "dynamic-keys", "nothreads", "nested-values dynamic-keys", "nested-values dynamic-keys nothreads"] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Check | |
# A failing `cargo check` always ends the build | |
run: | | |
cargo check --all-targets --verbose --features "${{ matrix.features }}" | |
# A failing `cargo check` always fails the build | |
continue-on-error: false | |
- name: Test | |
run: | | |
cargo test --all-targets --verbose --features "${{ matrix.features }}" | |
# We only require tests to succeed on the default feature combinations. | |
# | |
# This is necessary because we had CI disabled for a long time when | |
# Travis CI got rid of their free plans. | |
# It took us a while to switch to Github Actions. | |
# | |
# TODO: Fix the build on all feature combos | |
continue-on-error: ${{ matrix.features == '' }} | |
- name: Clippy | |
# With the exception of nightly, we use --deny warnings to treat warnings on errors. | |
run: | | |
cargo clippy --all-targets --verbose --features "${{ matrix.features }}" --deny "${{ matrix.rust != 'nightly' && 'warnings' || 'clippy::correctness' }}" | |
# Clippy is required to succeed on hardcoded versions, and not give any warnings | |
# | |
# However, on automatically updated versions of rust (both stable & nightly) we allow clippy to fail. | |
# This is in case automatic updates have introduced new lints that would give warnings/errors | |
# about code that was previously allowed. | |
# | |
# This is the main reason that we have a 'hardcoded recent stable' version. | |
# We want as many lints from recent stable possible | |
# but don't want the surprises of automatic updates to our stable rust. | |
continue-on-error: ${{ matrix.rust == 'nightly' || matrix.rust == 'stable' }} |