CI: Don't fetch submodules on checkout #54
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 | |
on: | |
push: | |
branches: | |
- master | |
- github_ci | |
tags: | |
- '*' | |
jobs: | |
build_and_test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["2.7", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
include: | |
- python-version: "3.5" | |
os: ubuntu-20.04 | |
pip-trusted-host: "pypi.python.org pypi.org files.pythonhosted.org" | |
- python-version: "3.6" | |
os: ubuntu-20.04 | |
- python-version: "3.x" | |
os: macos-latest | |
- python-version: "3.x" | |
os: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: false | |
- uses: actions/cache@v4 | |
with: | |
key: ${{ runner.os}}-pip-${{ matrix.python-version }} | |
path: ~/.cache/pip | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Update package list | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: MatteoH2O1999/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache-build: true | |
env: | |
PIP_TRUSTED_HOST: ${{ matrix.pip-trusted-host }} | |
- run: | | |
lsb_release -a | |
uname -a | |
if: startsWith(matrix.os, 'ubuntu') | |
- run: python --version | |
- name: Install dependencies | |
run: | | |
pip install -U pytest pytest-cov codecov | |
pip install -U cpp-coveralls | |
pip install scrutinizer-ocular | |
- name: Install package | |
run: | | |
pip install -e ".[all]" | |
- run: pip list | |
- name: Test | |
run: | | |
py.test -v --doctest-glob='*.md' --cov src | |
coveralls --build-root=. --include=src --dump=cpp-coveralls.json | |
env: | |
COVERAGE_CORE: sysmon | |
- name: Convert coverage | |
run: python -m coverage xml | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
- name: Upload to Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
file: coverage.xml | |
flag-name: ${{ runner.os }}-py${{ matrix.python-version }} | |
parallel: true | |
coverage: | |
needs: build_and_test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Finish coverage collection | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel-finished: true |