Improvements

pull/2572/head
Feist Josselin 2 months ago
parent 3a6888694d
commit 9122cef24e
  1. 28
      .github/workflows/ci.yml
  2. 65
      .github/workflows/ci_pr.yml

@ -5,11 +5,12 @@ defaults:
run: run:
shell: bash shell: bash
# We run all the CI tests only on cron job
# This is to reduce the CI time, and prevent issues
# Like with the etherscan API
# All the test from ci_pr are run here + additional ones
on: on:
push:
branches:
- master
- dev
pull_request:
schedule: schedule:
# run CI every day even if no PRs/merges occur # run CI every day even if no PRs/merges occur
- cron: '0 12 * * *' - cron: '0 12 * * *'
@ -24,24 +25,9 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
os: ["ubuntu-latest", "windows-2022"] os: ${{ (github.event_name == 'pull_request' && fromJSON('["ubuntu-latest"]')) || fromJSON('["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"]') }} python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.12"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12"]') }}
type: ["cli", type: ${{ (github.event_name == 'pull_request' && fromJSON('["data_dependency", "path_filtering","erc","find_paths","flat","interface", "printers","slither_config","upgradability"]')) || fromJSON('["data_dependency", "path_filtering","erc","find_paths","flat","interface", "printers","slither_config","upgradability", "cli", "dapp", "etherscan", "kspec", "simil", "truffle"]') }}
"dapp",
"data_dependency",
"path_filtering",
"erc",
"etherscan",
"find_paths",
"flat",
"interface",
"kspec",
"printers",
# "prop"
"simil",
"slither_config",
"truffle",
"upgradability"]
exclude: exclude:
# Requires nix # Requires nix
- os: windows-2022 - os: windows-2022

@ -1,65 +0,0 @@
---
name: CI
defaults:
run:
shell: bash
on:
push:
branches:
- master
- dev
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] # Do not run on windows to save time. In practice not many users are on windows, and this is still run on the cron job
python: ${{ (github.event_name == 'pull_request' && fromJSON('["3.8", "3.12"]')) || fromJSON('["3.8", "3.9", "3.10", "3.11", "3.12"]') }}
type: ["data_dependency",
"path_filtering",
"erc",
"find_paths",
"flat",
"interface",
"printers",
"slither_config",
"upgradability"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
pip install ".[test]"
solc-select use 0.4.25 --always-install
solc-select use 0.8.0 --always-install
solc-select use 0.5.1 --always-install
- name: Set up nix
if: matrix.type == 'dapp'
uses: cachix/install-nix-action@V27
- name: Set up cachix
if: matrix.type == 'dapp'
uses: cachix/cachix-action@v15
with:
name: dapp
- name: Run Tests
env:
PYTHONUTF8: 1
TEST_TYPE: ${{ matrix.type }}
GITHUB_ETHERSCAN: ${{ secrets.GITHUB_ETHERSCAN }}
run: |
bash "scripts/ci_test_${TEST_TYPE}.sh"
Loading…
Cancel
Save