Skip to content

Merge pull request #375 from argonne-lcf/release23 #1159

Merge pull request #375 from argonne-lcf/release23

Merge pull request #375 from argonne-lcf/release23 #1159

Workflow file for this run

name: CI Tests
on:
push:
branches:
- main
paths-ignore:
- 'mkdocs.yml'
- 'docs/**'
pull_request: {}
jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
- name: set up python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Balsam
run: |
make install-dev
pip freeze
- name: Lint
run: make lint
- name: Check default Site settings.yml files
run: make validate-defaults
- name: Mypy (type checking)
run: make mypy
test-linux:
name: Testing with Python${{ matrix.python-version }} on Ubuntu
needs: lint
runs-on: ubuntu-latest
services:
postgres:
# Docker Hub image
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: balsam-test
# 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
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
env:
PYTHON: ${{ matrix.python-version }}
OS: ubuntu
BALSAM_TEST_DB_URL: postgresql://postgres:postgres@localhost:5432/balsam-test
PYTHONUNBUFFERED: 1
steps:
- uses: actions/checkout@v3
- name: Set up Python env
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install mpich
run: sudo apt-get update && sudo apt-get install -y -q libmpich-dev
- name: Install Balsam
run: |
make install-dev
pip freeze
- name: tests
run: make testcov
- name: Archive test logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-logs
path: pytest-logs/
- run: coverage xml
- uses: codecov/[email protected]
with:
files: ./coverage.xml
env_vars: PYTHON,OS