Skip to content

[ BREAKING CHANGE] Feat/context template #6

[ BREAKING CHANGE] Feat/context template

[ BREAKING CHANGE] Feat/context template #6

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Tests for platform ${{ matrix.os }}/${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
target: x86_64-osx
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
coverage: true
conventional_commit_check: true
- os: ubuntu-latest
target: armv7-unknown-linux-musleabihf
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
key: "${{ matrix.os }}-${{ matrix.target }}"
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install cargo-llvm-cov
if: ${{matrix.coverage}}
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Collect coverage data
if: ${{matrix.coverage}}
run: cargo llvm-cov nextest --lcov --output-path lcov.info
- name: Upload coverage to Codecov
if: ${{matrix.coverage}}
uses: codecov/codecov-action@v3
with:
files: lcov.info
fail_ci_if_error: true
- name: Test with latest nextest release
if: ${{ ! matrix.coverage }}
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --test-threads=1
lints:
name: Lints & Format
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: clippy
args: -- -D warnings
e2e:
name: End to end tests
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run bats test harnesss
run: |
docker build -t bombadil-tests ./
docker run bombadil-tests