CI #1
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
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
check: | |
name: Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Fuel toolchain | |
run: | | |
curl https://install.fuel.network | sh && \ | |
~/.fuelup/bin/fuelup toolchain install nightly-2024-07-24 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Rust Cache | |
uses: Swatinem/[email protected] | |
- name: Build contracts | |
run: ~/.fuelup/bin/forc build --release | |
- name: Run contract tests | |
run: cargo test --release local_tests | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Install node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
registry-url: https://registry.npmjs.org/ | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Run linter | |
run: pnpm lint | |
- name: Run Envio codegen | |
run: pnpm -r codegen | |
- name: Run Indexer tests | |
run: pnpm -r test |