Skip to content

ci: unify CI jobs

ci: unify CI jobs #6

Workflow file for this run

name: CI
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:
name: CI (Python ${{ matrix.python }} on ${{ matrix.os }}, ${{ matrix.type }} test)
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: ["ubuntu-latest", "macos-latest", "windows-2022"]
type: ["solc", "solc_upgrade", "os_specific"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install solc-select
run: |
python3 -m venv test-venv
source test-venv/bin/activate
pip3 install .
- name: Run Tests
env:
TEST_TYPE: ${{ (matrix.type != 'os_specific' && matrix.type) || runner.os }}
run: |
source test-venv/bin/activate
TEST_TYPE="$(echo "$TEST_TYPE" | tr '[:upper:]' '[:lower:]')"
bash scripts/test_${TEST_TYPE}.sh