Fix spread and co-loc due to vice versa role assignment. Remove f_com… #99
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: 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@v2 | |
# - 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: ./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) |