Skip to content

ci: all inclusive with badges #2

ci: all inclusive with badges

ci: all inclusive with badges #2

Workflow file for this run

name: CI
on:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- test
- coverage
steps:
- name: checkout repository
uses: actions/checkout@main
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Initializing env file
run: |
echo '# github action setup' >> ./contracts/.env
echo MAINNET_URL=${{ secrets.MAINNET_URL }} >> ./contracts/.env
echo SEPOLIA_URL=${{ secrets.SEPOLIA_URL }} >> ./contracts/.env
echo MAINNET_FORK_BLOCK=${{ secrets.MAINNET_FORK_BLOCK }} >> ./contracts/.env
echo PRIVATE_KEY=${{ secrets.PRIVATE_KEY }} >> ./contracts/.env
echo ETHERSCAN_API_KEY=${{ secrets.ETHERSCAN_API_KEY }} >> ./contracts/.env
- name: Execute ${{ matrix.target }}
run: make -C ./contracts ${{ matrix.target == 'test' && 'test' || 'coverage_ci' }}
- name: Upload coverage reports to Codecov
if: matrix.target == 'coverage'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./contracts/lcov.info