Skip to content

Add support for channel 2 of AdqDigitizer's #642

Add support for channel 2 of AdqDigitizer's

Add support for channel 2 of AdqDigitizer's #642

Workflow file for this run

name: Tests
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
tests:
runs-on: ubuntu-latest
env:
DISPLAY: ":99.0"
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
- name: Cache Conda
uses: actions/cache@v1
env:
# Increase this value to reset cache manually
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
- name: Cache pip
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}-${{ hashFiles('.github/dependabot/constraints.txt') }}
- name: Setup Conda
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: environment.yml
miniconda-version: "latest"
channel-priority: strict
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
- name: Install OS dependencies
run: |
sudo apt-get -q update
sudo -E apt-get -yq --no-install-suggests --no-install-recommends install \
libxkbcommon-x11-0 x11-apps libgl1-mesa-glx qtbase5-dev xvfb
echo $'\nexport CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}' >> ~/.profile
echo $'\nexport LD_LIBRARY_PATH=${CONDA_PREFIX}/lib:${LD_LIBRARY_PATH}' >> ~/.profile
- name: Install python dependencies
shell: bash -l {0}
run: |
git submodule update --init
python3 -m pip install --upgrade pip
python3 -m pip install ".[test]" --constraint .github/dependabot/constraints.txt
- name: Build and test with pytest - parallel
shell: bash -l {0}
run: |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1400x900x24
sleep 3
# test parallel version
python3 setup.py build_ext --inplace --with-tests
python3 setup.py test -v
- name: Build and test with pytest - serial
shell: bash -l {0}
run: |
# test serial version
export BUILD_SERIAL_FOAM=1
python3 setup.py build_ext --inplace --with-tests
# Only the algorithms change in the serial build, so we don't bother
# running the other tests.
python3 -m pytest extra_foam/algorithms -v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1