Skip to content

ci: Add workflows for tests and linting #1

ci: Add workflows for tests and linting

ci: Add workflows for tests and linting #1

Workflow file for this run

name: Test & Lint
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
schedule:
# Run CI every night and check that tests are working with the latest dependencies.
- cron: '0 0 * * *'
jobs:
pre-commit:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
env:
PYTHONPATH: ${{ github.workspace }}/install/lib/python${{ matrix.python-version }}/site-packages:${{ github.workspace }}/install/lib/python${{ matrix.python-version }}/dist-packages
steps:
- name: Checkout commit locally
uses: actions/checkout@v3
- name: Checkout tags
# Necessary for setuptools_scm to be able to infer the correct version.
run: git fetch --unshallow --tags
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install subscript-internal with dependencies
run: |
pip install --upgrade pip
pip install ".[tests,docs,ert]"
- name: Run tests
run: |
python -c "import completor"
pytest tests/