build #744
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: build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
schedule: | |
- cron: "30 1 * * *" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04] | |
python-version: [3.8, 3.9, "3.10", "3.11"] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: test | |
channels: conda-forge | |
python-version: ${{ matrix.python-version }} | |
- name: Install OS dependencies | |
run: | | |
# see https://github.com/matplotlib/matplotlib/blob/main/.github/workflows/tests.yml | |
sudo apt-get update -yy | |
sudo apt-get install -yy \ | |
ccache \ | |
cm-super \ | |
dvipng \ | |
ffmpeg \ | |
fonts-noto-cjk \ | |
gdb \ | |
gir1.2-gtk-3.0 \ | |
graphviz \ | |
inkscape \ | |
lcov \ | |
libcairo2 \ | |
libcairo2-dev \ | |
libffi-dev \ | |
libgeos-dev \ | |
libgirepository1.0-dev \ | |
libsdl2-2.0-0 \ | |
libxkbcommon-x11-0 \ | |
libxcb-icccm4 \ | |
libxcb-image0 \ | |
libxcb-keysyms1 \ | |
libxcb-randr0 \ | |
libxcb-render-util0 \ | |
libxcb-xinerama0 \ | |
lmodern \ | |
fonts-freefont-otf \ | |
texlive-pictures \ | |
pkg-config \ | |
qtbase5-dev \ | |
texlive-fonts-recommended \ | |
texlive-latex-base \ | |
texlive-latex-extra \ | |
texlive-latex-recommended \ | |
texlive-luatex \ | |
texlive-xetex \ | |
ttf-wqy-zenhei \ | |
libopengl0 | |
- name: Install setup requirements | |
run: | | |
conda install -n test -q -y pip setuptools setuptools_scm | |
- name: Conda information | |
run: | | |
conda info --all | |
conda list -n test | |
- name: Install psrqpy | |
run: | | |
python -m pip install -e .[test,docs] -vv --no-build-isolation | |
- name: Run test suite | |
run: | | |
xvfb-run -a python -m pytest --cov-report=xml --cov=psrqpy | |
- name: Test building docs | |
if: ${{ matrix.python-version == '3.8' }} | |
run: | | |
cd docs | |
mkdir source/_static | |
make html | |
cd .. | |
- name: Upload coverage to Codecov | |
if: ${{ matrix.python-version == '3.8' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
fail_ci_if_error: true | |
verbose: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |