Skip to content

add badge to readme, write permissions for ci steps #335

add badge to readme, write permissions for ci steps

add badge to readme, write permissions for ci steps #335

Workflow file for this run

name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Cargo update
run: cargo update
- uses: actions-rs/cargo@v1
with:
command: check
test:
runs-on: ubuntu-latest
permissions:

Check failure on line 32 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

You have an error in your yaml syntax on line 32
contents: write
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
- name: Test coverage
run: make coverage
- name: Upload coverage results
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: coverage
create_branch: true
commit_message: Update coverage
# - name: Run cargo-tarpaulin
# uses: actions-rs/[email protected]
# with:
# version: '0.15.0'
# args: '-- --test-threads 1'
#
# - name: Archive code coverage results
# uses: actions/upload-artifact@v4
# with:
# name: code-coverage-report-${{ matrix.runs-on }}
# path: cobertura.xml
# - name: Download All Artifacts
# uses: actions/download-artifact@v4
# with:
# path: cobertura.xml
# pattern: code-coverage-report-*
# merge-multiple: true
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
sec:
name: Security audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}