|
| 1 | +--- |
1 | 2 | name: CI
|
2 | 3 |
|
3 | 4 | on:
|
|
8 | 9 | pull_request:
|
9 | 10 | schedule:
|
10 | 11 | # run CI every day even if no PRs/merges occur
|
11 |
| - - cron: '0 12 * * *' |
| 12 | + - cron: '0 12 * * *' |
12 | 13 |
|
13 | 14 | jobs:
|
14 | 15 | tests:
|
15 |
| - runs-on: ubuntu-latest |
| 16 | + runs-on: ${{ matrix.os }} |
16 | 17 | strategy:
|
17 | 18 | matrix:
|
18 |
| - type: ["solc", "truffle", "embark", "etherlime", "brownie", "waffle", "buidler", "hardhat"] |
| 19 | + os: ["ubuntu-latest", "windows-2022"] |
| 20 | + type: ["brownie", "buidler", "dapp", "embark", "etherlime", "hardhat", "solc", "truffle", "waffle"] |
| 21 | + exclude: |
| 22 | + # Currently broken, tries to pull git:// which is blocked by GH |
| 23 | + - type: embark |
| 24 | + # Requires nix |
| 25 | + - os: windows-2022 |
| 26 | + type: dapp |
19 | 27 | steps:
|
20 |
| - - uses: actions/checkout@v1 |
| 28 | + - uses: actions/checkout@v3 |
| 29 | + - name: Set up shell |
| 30 | + if: runner.os == 'Windows' |
| 31 | + run: | |
| 32 | + echo 'C:\msys64\mingw64\bin' >> "$GITHUB_PATH" |
| 33 | + echo 'C:\msys64\usr\bin' >> "$GITHUB_PATH" |
| 34 | + - name: Choose Node version |
| 35 | + id: node |
| 36 | + shell: bash |
| 37 | + run: | |
| 38 | + if [ ${{ matrix.type }} = etherlime ]; then |
| 39 | + echo '::set-output name=version::10.17.0' |
| 40 | + else |
| 41 | + echo '::set-output name=version::lts/*' |
| 42 | + fi |
| 43 | + - name: Set up Node |
| 44 | + uses: actions/setup-node@v2 |
| 45 | + with: |
| 46 | + node-version: ${{ steps.node.outputs.version }} |
21 | 47 | - name: Set up Python 3.6
|
22 |
| - uses: actions/setup-python@v1 |
| 48 | + uses: actions/setup-python@v3 |
23 | 49 | with:
|
24 | 50 | python-version: 3.6
|
25 | 51 | - name: Install dependencies
|
26 | 52 | run: |
|
27 |
| - sudo wget -O /usr/bin/solc https://github.com/ethereum/solidity/releases/download/v0.5.7/solc-static-linux |
28 |
| - sudo chmod +x /usr/bin/solc |
| 53 | + pip install "solc-select>=v1.0.0b1" |
| 54 | + solc-select use 0.5.7 --always-install |
29 | 55 | pip install .
|
| 56 | + - name: Set up nix |
| 57 | + if: matrix.type == 'dapp' |
| 58 | + uses: cachix/install-nix-action@v16 |
| 59 | + - name: Set up cachix |
| 60 | + if: matrix.type == 'dapp' |
| 61 | + uses: cachix/cachix-action@v10 |
| 62 | + with: |
| 63 | + name: dapp |
30 | 64 | - name: Run Tests
|
31 | 65 | env:
|
32 | 66 | TEST_TYPE: ${{ matrix.type }}
|
33 | 67 | GITHUB_ETHERSCAN: ${{ secrets.GITHUB_ETHERSCAN }}
|
| 68 | + shell: bash |
34 | 69 | run: |
|
35 |
| - bash scripts/travis_test_${TEST_TYPE}.sh |
| 70 | + bash "scripts/travis_test_${TEST_TYPE}.sh" |
0 commit comments