Merge branch 'main' of github.com:hadronlabs-org/lionco-contracts int… #435
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Log in to Private Registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build images | |
run: | | |
cd integration_tests | |
yarn build-images | |
- name: Lint | |
run: cd integration_tests && yarn --ignore-engines && yarn lint | |
- run: make compile | |
- name: Run tests | |
run: | | |
cd integration_tests | |
MAX_THREADS=4 yarn vitest ./src --run --bail 1 |