feat: final submission #63
Workflow file for this run
This file contains hidden or 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: | |
pull_request: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
trader-lint: | |
name: 'CoW Trader Lint' | |
runs-on: 'ubuntu-latest' | |
defaults: | |
run: | |
working-directory: './cow-trader' | |
steps: | |
- name: 'Checkout the repo' | |
uses: 'actions/checkout@v4' | |
- name: 'Install UV' | |
uses: 'astral-sh/setup-uv@v5' | |
with: | |
version: '0.5.26' | |
- name: 'Setup Python' | |
uses: 'actions/setup-python@v5' | |
with: | |
python-version-file: './cow-trader/pyproject.toml' | |
- name: 'Install dependencies' | |
run: 'uv sync --all-extras --dev' | |
- name: 'Lint with Ruff' | |
uses: astral-sh/ruff-action@v3 | |
- name: 'Add lint summary' | |
run: | | |
echo "## Lint result" >> $GITHUB_STEP_SUMMARY | |
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | |
contracts-lint: | |
name: 'Smart Contract Lint' | |
runs-on: 'ubuntu-latest' | |
defaults: | |
run: | |
working-directory: './smart-contract-infra' | |
steps: | |
- name: 'Check out the repo' | |
uses: 'actions/checkout@v4' | |
- name: 'Install Foundry' | |
uses: 'foundry-rs/foundry-toolchain@v1' | |
- name: 'Install Bun' | |
uses: 'oven-sh/setup-bun@v1' | |
- name: 'Install the Node.js dependencies' | |
run: 'bun install' | |
- name: 'Lint the code' | |
run: 'bun run lint' | |
- name: 'Add lint summary' | |
run: | | |
echo "## Lint result" >> $GITHUB_STEP_SUMMARY | |
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | |
contracts-build: | |
name: 'Smart Contract Build' | |
runs-on: 'ubuntu-latest' | |
defaults: | |
run: | |
working-directory: './smart-contract-infra' | |
steps: | |
- name: 'Check out the repo' | |
uses: 'actions/checkout@v4' | |
- name: 'Install Foundry' | |
uses: 'foundry-rs/foundry-toolchain@v1' | |
- name: 'Install Bun' | |
uses: 'oven-sh/setup-bun@v1' | |
- name: 'Install the Node.js dependencies' | |
run: 'bun install' | |
- name: 'Build the contracts and print their size' | |
run: 'forge build --sizes' | |
- name: 'Add build summary' | |
run: | | |
echo "## Build result" >> $GITHUB_STEP_SUMMARY | |
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY | |
contracts-test: | |
name: 'Smart Contract Test' | |
needs: ['contracts-lint', 'contracts-build'] | |
runs-on: 'ubuntu-latest' | |
defaults: | |
run: | |
working-directory: './smart-contract-infra' | |
steps: | |
- name: 'Check out the repo' | |
uses: 'actions/checkout@v4' | |
- name: 'Install Foundry' | |
uses: 'foundry-rs/foundry-toolchain@v1' | |
- name: 'Install Bun' | |
uses: 'oven-sh/setup-bun@v1' | |
- name: 'Install the Node.js dependencies' | |
run: 'bun install' | |
- name: 'Run the tests' | |
run: 'forge test' | |
- name: 'Add test summary' | |
run: | | |
echo "## Tests result" >> $GITHUB_STEP_SUMMARY | |
echo "✅ Passed" >> $GITHUB_STEP_SUMMARY |