Skip to content

Bump the actions-minor group across 1 directory with 6 updates #276

Bump the actions-minor group across 1 directory with 6 updates

Bump the actions-minor group across 1 directory with 6 updates #276

Workflow file for this run

---
name: CI
"on":
pull_request:
push:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
contents: read
# For Github OIDC integration tests:
id-token: write
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- run: rustup --version
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- run: cargo fmt --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- run: rustup --version
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Check for common mistakes with Clippy
run: cargo clippy --all-targets --all-features -- -Dclippy::all
typos:
runs-on: ubuntu-latest
steps:
- run: rustup --version
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Check source for typos and spelling issues
uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # v1.47.2
cargo_audit:
runs-on: ubuntu-latest
steps:
- run: rustup --version
- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Check for security advisories
run: cargo audit
test:
runs-on: ubuntu-latest
steps:
- run: rustup --version
- name: Cache Cargo registry and dependencies
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: cargo generate-lockfile
if: hashFiles('Cargo.lock') == ''
run: cargo generate-lockfile
- name: cargo test --locked
run: cargo test --locked --all-features
amplify-integration-test:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
env:
TEST_TAG: "amplifysecurity/runner:test-${{ github.sha }}"
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
- uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7.2.0
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
network: host
- name: Run Amplify Security Scan (Lab)
run: |
docker run --rm \
-v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE -w $GITHUB_WORKSPACE \
-v $GITHUB_EVENT_PATH:$GITHUB_EVENT_PATH \
-e AMPLIFY_ENDPOINT=https://api.lab.amplify.security \
-e RUST_BACKTRACE=full \
--env-file <(env | grep -P 'ACTIONS|GITHUB') \
${{ env.TEST_TAG }}