Skip to content

[oarsub] add test for -p with sql clause #476

[oarsub] add test for -p with sql clause

[oarsub] add test for -p with sql clause #476

Workflow file for this run

name: OAR3 - run tests
on:
push:
branches:
- '*'
workflow_call:
secrets:
DOCKERTOKEN:
required: true
DOCKERUSER:
required: true
jobs:
Check-Code-Formatting:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- uses: cachix/install-nix-action@v20
# - run: nix develop
# - run: nix flake check
# - name: Install dev requirements
# run: pip install -r requirements/dev.txt
- name: Check code formatting
run: nix profile install nixpkgs#poetry
- run: |
poetry install
source $(poetry env info --path)/bin/activate
./scripts/ci/check-formatting.sh
Run-Tests-On-Docker:
runs-on: ubuntu-latest
strategy:
matrix:
images:
# Configuration for bullseye
- { PYTHON_IMAGE: "python:3.10", POSTGRES_IMAGE: "postgres:13" }
steps:
- name: Check out repository code
uses: actions/checkout@v2
# Connect to docker to have user-base docker rate limit instead of by ip
- name: Connect to dockerhub
run: echo $DOCKERTOKEN | docker login --username ${DOCKERUSER} --password-stdin
env:
DOCKERUSER: ${{ secrets.DOCKERUSER }}
DOCKERTOKEN: ${{ secrets.DOCKERTOKEN }}
- name: Build dockers
run: ./scripts/ci/build-docker-env.sh
env:
# Images configurations
PYTHON_IMAGE: ${{ matrix.images.PYTHON_IMAGE }}
POSTGRES_IMAGE: ${{ matrix.images.POSTGRES_IMAGE }}
- name: Run tests
run: ./scripts/ci/run-tests-with-docker.sh
env:
PYTHON_IMAGE: ${{ matrix.images.PYTHON_IMAGE }}
POSTGRES_IMAGE: ${{ matrix.images.POSTGRES_IMAGE }}
- name: Upload coverage
uses: actions/upload-artifact@v2
with:
name: coverage-report
path: coverage.xml
Code-Coverage:
runs-on: ubuntu-latest
needs: Run-Tests-On-Docker
if: success()
steps:
# Check out repository so codecov isn't lost
- uses: actions/checkout@master
- name: Download artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- uses: codecov/codecov-action@v4
with:
fail_ci_if_erro: true
flags: unittests
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)