Skip to content

feat: gh workflow

feat: gh workflow #49

Workflow file for this run

on:
push:
branches:
- '**'
name: tests
jobs:
clippy:
name: Actions - clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.73.0
components: clippy
profile: minimal
override: true
- run: cargo fetch --verbose
- run: cargo clippy --all --all-targets -- -D warnings
rustfmt:
name: Actions - rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.73.0
components: rustfmt
profile: minimal
override: true
- run: cargo fmt -- --check
unit-test:
name: Actions - unit test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.73.0
profile: minimal
- run: cargo fetch --verbose
- run: cargo build
- run: cargo test --verbose --all
env:
RUST_BACKTRACE: 1
integration-test:
name: Actions - integration test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.73.0
profile: minimal
- run: make build
- name: Setup node
uses: actions/setup-node@v3
with:
cache: 'yarn'
- name: Lint
run: cd integration_tests && yarn --ignore-engines && yarn lint
- name: Build image
uses: borales/actions-yarn@v4
with:
cmd: build-images
dir: integration_tests
- name: Run tests
uses: borales/actions-yarn@v4
with:
cmd: test
dir: integration_tests