CI scripts #2823
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 scripts | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
pull_request: | |
schedule: | |
# run CI every day even if no PRs/merges occur | |
- cron: '0 12 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "windows-2022"] | |
python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.12"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12"]') }} | |
type: ["brownie", "buidler", "dapp", "embark", "hardhat", "solc", "truffle", "waffle", "foundry", "standard", "vyper", "solc_multi_file", "hardhat_multi_file"] | |
exclude: | |
# Currently broken, tries to pull git:// which is blocked by GH | |
- type: embark | |
# Requires nix | |
- os: windows-2022 | |
type: dapp | |
# Explore foundry support in windows | |
- os: windows-2022 | |
type: foundry | |
# brownie does not install correctly with Python 3.10 | |
- python: 3.10 | |
type: brownie | |
# brownie does not install correctly with Python 3.11 | |
- python: 3.11 | |
type: brownie | |
# brownie does not install correctly with Python 3.12 | |
- python: 3.12 | |
type: brownie | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up shell | |
if: runner.os == 'Windows' | |
run: | | |
echo 'C:\msys64\mingw64\bin' >> "$GITHUB_PATH" | |
echo 'C:\msys64\usr\bin' >> "$GITHUB_PATH" | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.15 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
pip install . | |
solc-select use 0.5.7 --always-install | |
- name: Set up nix | |
if: matrix.type == 'dapp' | |
uses: cachix/install-nix-action@v25 | |
- name: Set up cachix | |
if: matrix.type == 'dapp' | |
uses: cachix/cachix-action@v14 | |
with: | |
name: dapp | |
- name: Install Foundry | |
if: matrix.type == 'foundry' | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Run Tests | |
env: | |
TEST_TYPE: ${{ matrix.type }} | |
GITHUB_ETHERSCAN: ${{ secrets.GITHUB_ETHERSCAN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
shell: bash | |
run: | | |
bash "scripts/ci_test_${TEST_TYPE}.sh" |