Skip to content

Review fixes

Review fixes #168

Workflow file for this run

on:
push:
branches:
- '**'
name: tests
jobs:
clippy:
name: Actions - clippy
runs-on: self-hosted
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: self-hosted
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: self-hosted
steps:
- uses: actions/checkout@v1
- 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: self-hosted
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L "https://github.com/docker/compose/releases/download/v2.23.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
- uses: actions/checkout@v1
with:
fetch-depth: 1
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.73.0
profile: minimal
override: true
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18.16.1'
cache: 'yarn'
cache-dependency-path: integration_tests/yarn.lock
- name: Setup Go environment
uses: actions/[email protected]
with:
go-version: 1.20
cache: false
- name: Lint
run: cd integration_tests && yarn --ignore-engines && yarn lint
# - name: Build images
# run: |
# cd integration_tests
# cat package.json | grep -e "build-[a-z]*-image\"" | awk -F: '{print $1}' | tr -d ' ",{}' | xargs -I % -P 3 yarn %
- name: Build images
run: |
cd integration_tests
yarn build-images
- run: make compile
- name: Run tests
run: |
cd integration_tests
yarn vitest ./src --run --shard 1/2 --bail 1
yarn vitest ./src --run --shard 2/2 --bail 1