Skip to content

Release v0.0.9

Release v0.0.9 #8

Workflow file for this run

name: Validate code changes
on: # rules for when this action will be triggered
push:
paths-ignore: # ignore docs in this action - handled in a separate action
- 'docs/**'
- '*.md'
- '*.rst'
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
workflow_dispatch: # allows triggering a github action manually - see 'Actions' tab
# When this workflow is queued, automatically cancel any previous running
# or pending jobs from the same branch
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
# This job checks that no optional dependencies are imported in the core code.
# In the future we may include checks for certain optional depdendency subgroups.
check-core-imports:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ]
python-version: ["3.8"]
defaults:
run:
shell: bash
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies
uses: actions/cache@v3
id: cache
with:
# https://blog.allenai.org/python-caching-in-github-actions-e9452698e98d
path: |
${{ env.pythonLocation }}
key: ${{ matrix.python-version }}-ubuntu-latest-${{ hashFiles('.github/ci-pinned-requirements/core.txt') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: python -m pip install -r .github/ci-pinned-requirements/core.txt
- name: Checks core imports
run: |
python -m pip install impall==1.3.1
python -m impall --NO_CLEAR_SYS_MODULES -E 'test**:superduperdb/ext**'
lint-type-check-and-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest" ] # TODO: add "windows-latest", "macos-latest" when Docker removed
python-version: ["3.8", "3.9", "3.10", "3.11"]
defaults:
run:
shell: bash
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache dependencies and mypy analysis
uses: actions/cache@v3
id: cache
with:
# https://blog.allenai.org/python-caching-in-github-actions-e9452698e98d
path: |
./.mypy_cache
${{ env.pythonLocation }}
key: ${{ matrix.python-version }}-ubuntu-latest-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('.github/ci-pinned-requirements/dev.txt') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r .github/ci-pinned-requirements/dev.txt
- name: Basic health check
run: |
black --version
ruff --version
mypy --version
- name: Lint and type-check
run: |
make lint
- name: test
run: |
make test PYTEST_ARGUMENTS="--cov=superduperdb --cov-report=xml test"
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v3.1.4
with:
env_vars: RUNNER_OS,PYTHON_VERSION
file: ./coverage.xml
fail_ci_if_error: false
name: codecov-umbrella