Bump version: 9.12.0 → 9.12.1 #3281
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Pytest | |
on: | |
push: | |
paths-ignore: | |
- '**/*.md' | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
merge_group: | |
env: | |
SETUP_XVFB: True # avoid issues if mpl tries to open a GUI window | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
# the whole CI pipeline will be skipped if [ci skip] is in the commit msg | |
if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
# env: | |
# OMP_NUM_THREADS: 1 | |
# MKL_NUM_THREADS: 1 | |
# OPENBLAS_NUM_THREADS: 1 | |
# NUMEXPR_NUM_THREADS: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get -y install libbz2-dev | |
python -m pip install --upgrade pip | |
pip install wheel pytest pytest-cov coveralls | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Install picca | |
run: pip install -e . | |
- name: Test with pytest | |
timeout-minutes: 30 | |
run: | | |
pytest --capture=tee-sys --cov --cov-report xml --cov-config=.coveragerc . | |
# allow connecting to the github action run via ssh if [ci debug] has been in the commit msg | |
- name: Debug with tmate | |
if: ${{ always() && contains(github.event.head_commit.message, '[ci debug]') }} | |
uses: mxschmitt/action-tmate@v3 | |
with: | |
limit-access-to-actor: true | |
# the following bit will save results tests as an artifact if [ci save] has been in the commit msg | |
- name: Archive test results | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results_v${{ matrix.python-version }} | |
path: /tmp/last_run_picca_test | |
- name: Archive test results delta_extraction | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results-de_v${{ matrix.python-version }} | |
path: /home/runner/work/picca/picca/py/picca/tests/delta_extraction/results | |
- name: Coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
run: coveralls --service=gihtub | |
# flake8: | |
# runs-on: ubuntu-latest | |
# if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
# steps: | |
# - name: Lint with flake8 | |
# run: | | |
# pip install flake8 | |
# # stop the build if there are Python syntax errors or undefined names | |
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
# codestyle: | |
# runs-on: ubuntu-latest | |
# if: "!contains(github.event.head_commit.message, '[ci skip]')" | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - name: Python codestyle check | |
# uses: actions/setup-python@v2 | |
# with: | |
# python-version: 3.8 | |
# - name: Install base dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install pycodestyle | |
# - name: Check for runtime errors using pycodestyle | |
# run: | | |
# pycodestyle pypeit --count --select=E9 |