Skip to content

ci: declare secrets

ci: declare secrets #1

Workflow file for this run

name: CI
on:
workflow_call:
secrets:
GITHUB_TOKEN:

Check failure on line 6 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yaml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
required: true
jobs:
msrv:
runs-on: ubuntu-latest
outputs:
rust-version: ${{ steps.get-version.outputs.rust-version }}
steps:
- uses: actions/checkout@v4
- name: Extract version
id: get-version
run: |
MSRV=$(cargo metadata --no-deps --format-version=1 | jq -r '.packages[0].rust_version')
echo "rust-version=$MSRV" >> $GITHUB_OUTPUT
- name: Show version
run: |
echo "MSRV: ${{ steps.get-version.outputs.rust-version }}"
preflight:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: webiny/action-conventional-commits@v1.3.0
- uses: Swatinem/rust-cache@v2
- uses: obi1kenobi/cargo-semver-checks-action@v2
- name: Check formatting
run: |
cargo fmt --check
check:
needs:
- msrv
- preflight
strategy:
matrix:
rust:
- stable
- ${{ needs.msrv.outputs.rust-version }}
os:
- ubuntu-22.04
- windows-2022
- macos-14
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Install Rust ${{ matrix.rust }}
run: |
rustup install ${{ matrix.rust }} --no-self-update --component clippy
- name: Clippy
run: cargo +${{ matrix.rust }} clippy --all-targets --tests --bins --all -- -D warnings
- name: Test
run: cargo +${{ matrix.rust }} test
- name: Install binstall
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
- name: Install cargo-all-features
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cargo binstall -y cargo-all-features --force
- name: Check (all features)
run: |
cargo check-all-features