Skip to content

Airflow setup

Airflow setup #30

Workflow file for this run

name: Python application test with pytest
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
AIRFLOW_HOME: /home/runner/work/bi-dags/bi-dags
REGISTRY: registry.cern.ch
IMAGE: cern-sis/bi-dags
jobs:
build_test:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python 3
uses: actions/setup-python@v4
with:
python-version: 3.10.11
- name: Build Image
id: build
uses: cern-sis/gh-workflows/.github/actions/docker-build@v6
with:
registry: ${{ env.REGISTRY }}
image: ${{ env.IMAGE }}
tags: type=ref,event=pr
cache: false
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Run tests with pytest
run: >
docker run
--name cern-sis/biproject
--network=host
-v "$(pwd)"/cern-sis/biproject:/opt/airflow/tests
--entrypoint pytest cern-sis/biproject /opt/airflow/tests