Skip to content

Add a docker/dagger-based testing workflow, adopt PEP 517/621 #18

Add a docker/dagger-based testing workflow, adopt PEP 517/621

Add a docker/dagger-based testing workflow, adopt PEP 517/621 #18

Workflow file for this run

name: Dagger/Docker Testing Suite
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
inputs:
BASE_IMAGE_TAG:
description: 'Image tag to use for the Docker image'
required: true
default: 'latest'
PAVICS_HOST_URL:
description: 'Pavics URL to test against'
required: true
default: 'https://pavics.ouranos.ca/'
SANITIZE_FILE_URL:
description: 'URL for the sanitizer configuration'
required: true
default: 'https://github.com/Ouranosinc/PAVICS-e2e-workflow-tests/raw/master/notebooks/output-sanitize.cfg'
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
- name: Run pre-commit
uses: pre-commit/action@v3.0.0
integration:
name: Integration Tests
needs: lint
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.10"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set Environment Variables
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo "BASE_IMAGE_TAG=${{ github.event.inputs.image_tag }}" >> $GITHUB_ENV
echo "PAVICS_HOST_URL=${{ github.event.inputs.PAVICS_HOST_URL }}" >> $GITHUB_ENV
echo "SANITIZE_FILE_URL=${{ github.event.inputs.SANITIZE_FILE_URL }}" >> $GITHUB_ENV
- name: Dagger testing
run: |
pip install .[dagger]
python ./ci/dagger-pipeline.py