Skip to content

Bump streamflow from 0.2.0.dev13 to 0.2.0.dev14 #554

Bump streamflow from 0.2.0.dev13 to 0.2.0.dev14

Bump streamflow from 0.2.0.dev13 to 0.2.0.dev14 #554

Workflow file for this run

name: "CI Tests"
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
code-ql-check:
name: "CodeQL check"
runs-on: ubuntu-24.04
permissions:
security-events: write
steps:
- uses: actions/checkout@v6
- uses: github/codeql-action/init@v4
with:
config-file: .github/codeql/config.yml
languages: python
- uses: github/codeql-action/analyze@v4
static-checks:
name: "Static checks"
runs-on: ubuntu-24.04
strategy:
matrix:
step: [ "bandit", "lint" ]
env:
TOXENV: ${{ matrix.step }}
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
version: "0.9.16"
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: "Install Tox"
run: uv tool install tox --with tox-uv
- name: "Run static analysis via Tox"
run: tox
unit-tests:
name: "Unit tests"
strategy:
matrix:
on: [ "ubuntu-24.04" ]
python: [ "3.10", "3.11", "3.12", "3.13" ]
include:
- on: "macos-15-intel"
python: "3.13"
runs-on: ${{ matrix.on }}
env:
POSTGRES_DB: streamflow
POSTGRES_PASSWORD: streamflow
POSTGRES_USER: streamflow
POSTGRES_HOST: 127.0.0.1
TOXENV: ${{ format('py{0}-unit', matrix.python) }}
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
version: "0.9.16"
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
- uses: actions/setup-node@v6
with:
node-version: "20"
- name: "Install Docker (MacOs X)"
uses: douglascamata/setup-docker-macos-action@v1
if: ${{ startsWith(matrix.on, 'macos-') }}
with:
colima-additional-options: '--mount /private/var/folders:w'
- uses: docker/setup-qemu-action@v3
- name: "Start PostgreSQL Docker container"
run: |
docker run \
--rm \
--detach \
--env POSTGRES_DB=${{ env.POSTGRES_DB }} \
--env POSTGRES_PASSWORD=${{ env.POSTGRES_DB }} \
--env POSTGRES_USER=${{ env.POSTGRES_DB }} \
--publish 5432:5432 \
postgres:17.4-alpine
- name: "Install Postgresql client"
run: brew install libpq@17
if: ${{ startsWith(matrix.on, 'macos-') }}
- name: "Install Tox"
run: uv tool install tox --with tox-uv
- name: "Run tests via Tox"
run: tox
- name: "Upload coverage report for unit tests"
uses: actions/upload-artifact@v6
with:
name: ${{ format('{0}-py{1}-unit-tests', matrix.on, matrix.python) }}
path: ./coverage.xml
retention-days: 1
if-no-files-found: error
upload-to-codecov:
name: "Codecov report upload"
needs: [ "unit-tests" ]
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
- name: "Download artifacts"
uses: actions/download-artifact@v7
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}