Update gitignore #19
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: Python CI | |
on: | |
push: | |
branches: [] | |
paths-ignore: | |
- 'README.md' | |
pull_request: | |
branches: [] | |
paths-ignore: | |
- 'README.md' | |
# Specify concurrency such that only one workflow can run at a time | |
# * Different workflow files are not affected | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# Define a dependencies job that runs on all branches and PRs | |
# * Installs dependencies and caches them | |
build-venv: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Restore cached virtualenv, if available | |
# * The pyproject.toml hash is part of the cache key, invalidating | |
# the cache if the file changes | |
- name: Restore cached virtualenv | |
id: restore-cache | |
uses: actions/cache/restore@v3 | |
with: | |
path: ./venv | |
key: ${{ runner.os }}-venv-${{ hashFiles('**/pyproject.toml') }} | |
# Should mirror the build-venv stage in the Containerfile | |
- name: Build venv | |
run: | | |
apt -qq update && apt -qq install -y build-essential | |
python -m venv ./venv | |
./venv/bin/pip install --upgrade -q pip wheel setuptools | |
if: steps.restore-cache.outputs.cache-hit != 'true' | |
# Should mirror the build-reqs stage in the Containerfile | |
# * Except this installs the dev dependencies and binaries as well | |
- name: Install all dependencies | |
run: | | |
./venv/bin/pip install -q .[dev] | |
if: steps.restore-cache.outputs.cache-hit != 'true' | |
# Cache the virtualenv for future runs | |
- name: Cache virtualenv | |
uses: actions/cache/save@v3 | |
with: | |
path: ./venv | |
key: ${{ steps.restore-cache.outputs.cache-primary-key }} | |
if: steps.restore-cache.outputs.cache-hit != 'true' | |
# Define a unittest job that runs on all branches and PRs | |
test-unit: | |
runs-on: ubuntu-latest | |
needs: build-venv | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Restore cached virtualenv | |
- name: Restore cached virtualenv | |
uses: actions/cache/restore@v3 | |
with: | |
path: ./venv | |
key: ${{ runner.os }}-venv-${{ hashFiles('**/pyproject.toml') }} | |
# Run unittests | |
# * Produce JUnit XML report | |
- name: Run unit tests | |
run: ./venv/bin/python -m pytest --junitxml=ut-report.xml dags_tests | |
# Create test summary to be visualised on the job summary screen on GitHub | |
# * Runs even if previous steps fail | |
- name: Create test summary | |
uses: test-summary/action@v2 | |
with: | |
paths: "*t-report.xml" | |
show: "fail, skip" | |
if: always() | |