Skip to content

Merge pull request #5 from G-Core/fix/release2 #31

Merge pull request #5 from G-Core/fix/release2

Merge pull request #5 from G-Core/fix/release2 #31

Workflow file for this run

name: Continuous Integration
on: [ push ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Release build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
- name: Install cargo-audit binary crate
uses: actions-rs/[email protected]
with:
crate: cargo-audit
version: latest
use-tool-cache: true
- name: Annotate commit with clippy warnings
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
- name: Security audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
coverage:
needs: build
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- uses: actions-rs/cargo@v1
name: Run test with code coverage report
with:
command: test
args: --all-features --no-fail-fast
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests'
- id: coverage
name: Collect code coverage
uses: actions-rs/[email protected]
- name: Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: ${{ steps.coverage.outputs.report }}