Bump actions/upload-artifact from 3.1.3 to 4.0.0 #196
Workflow file for this run
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
permissions: | |
contents: read | |
on: | |
push: | |
branches: [main, master] | |
pull_request: | |
name: check | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
name: stable / fmt | |
permissions: | |
# Give the default GITHUB_TOKEN write permission to commit and push the | |
# added or changed files to the repository. | |
contents: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
with: | |
submodules: true | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@04b56c7813dcfe81f02753d8f4fe8b3635aa2dc0 # stable | |
# with: | |
# components: rustfmt | |
# - name: cargo fmt --check | |
# run: cargo fmt --check | |
- uses: mbrobbel/rustfmt-check@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
clippy: | |
runs-on: ubuntu-latest | |
name: ${{ matrix.toolchain }} / clippy | |
permissions: | |
contents: read | |
checks: write | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: [stable, beta] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
with: | |
submodules: true | |
- name: Install ${{ matrix.toolchain }} | |
uses: dtolnay/rust-toolchain@e12eda571dc9a5ee5d58eecf4738ec291c66f295 # master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: clippy | |
- name: cargo clippy | |
uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # v1.0.7 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
doc: | |
runs-on: ubuntu-latest | |
name: nightly / doc | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
with: | |
submodules: true | |
- name: Install nightly | |
uses: dtolnay/rust-toolchain@655bc29a221a62ee6edb6a0fa9d9530cf424d31d # nightly | |
- name: cargo doc | |
run: cargo doc --no-deps --all-features | |
env: | |
RUSTDOCFLAGS: --cfg docsrs | |
hack: | |
runs-on: ubuntu-latest | |
name: ubuntu / stable / features | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
with: | |
submodules: true | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@04b56c7813dcfe81f02753d8f4fe8b3635aa2dc0 # stable | |
- name: cargo install cargo-hack | |
uses: taiki-e/install-action@de2548c6ca44a5affa3f3edd100cc348412010ab # cargo-hack | |
- name: cargo hack | |
run: cargo hack --feature-powerset check --lib --tests | |
msrv: | |
runs-on: ubuntu-latest | |
# we use a matrix here just because env can't be used in job names | |
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability | |
strategy: | |
matrix: | |
msrv: [1.56.1] # 2021 edition requires 1.56 | |
name: ubuntu / ${{ matrix.msrv }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
with: | |
submodules: true | |
- name: Install ${{ matrix.msrv }} | |
uses: dtolnay/rust-toolchain@e12eda571dc9a5ee5d58eecf4738ec291c66f295 # master | |
with: | |
toolchain: ${{ matrix.msrv }} | |
- name: cargo +${{ matrix.msrv }} check | |
run: cargo check |