Remove auto-blocking session that is not actually used by any tools #571
Workflow file for this run
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 and Test | |
on: [push] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.8, 3.9, "3.10", "3.11"] | |
sqlalchemy-version: ["1.4", "2.0"] | |
numpy-version: ["1.18", "1.22"] | |
TANGOS_TESTING_DB_BACKEND: [sqlite, mysql+pymysql, postgresql+psycopg2] | |
runs-on: ${{ matrix.os }} | |
env: | |
C: gcc-10 | |
CXX: g++-10 | |
TANGOS_TESTING_DB_USER: root | |
TANGOS_TESTING_DB_PASSWORD: root | |
TANGOS_TESTING_DB_BACKEND: ${{ matrix.TANGOS_TESTING_DB_BACKEND }} | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: root | |
POSTGRES_PASSWORD: root | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
steps: | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/checkout@v2 | |
- name: Install gcc | |
run: | | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update -qq | |
sudo apt install gcc-10 g++-10 | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install numpy~=${{ matrix.numpy-version}} scipy "matplotlib<3.3.0" pytest h5py pip webtest pyquery sphinx pygments pandas sqlalchemy~=${{ matrix.sqlalchemy-version}} cython pyramid ipython pyramid_mako PyMySQL[rsa] psycopg2-binary | |
- name: Build and install tangos | |
run: | | |
python setup.py develop | |
- name: Check that tangos can import without pynbody | |
run: | | |
python -c "import tangos" | |
- name: Install pynbody and yt | |
run: python -m pip install pynbody yt --no-build-isolation | |
- name: Set up MySQL | |
if: ${{ matrix.TANGOS_TESTING_DB_BACKEND == 'mysql+pymysql' }} | |
run: | | |
sudo /etc/init.d/mysql start | |
- name: Run all tests | |
working-directory: tests | |
run: python -m pytest |