Skip to content

Datamodels correction for GMW_PositionsMeasuring #680

Datamodels correction for GMW_PositionsMeasuring

Datamodels correction for GMW_PositionsMeasuring #680

Workflow file for this run

# Generated by nens-meta.
# See https://nens-meta.readthedocs.io/en/latest/config-files.html for info.
# If you want this file to be left alone, add "nens_meta_leave_alone" in
# all caps somewhere in this file in a comment.
#
# ... which we want for now as we have a docker compose based setup...
# NENS_META_LEAVE_ALONE
name: nens-meta
on:
push:
branches:
- master
- main
tags:
- "*"
pull_request:
branches:
- master
- main
workflow_dispatch:
jobs:
nens-meta:
name: nens-meta
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- uses: pre-commit/[email protected]
- name: Build/pull docker
run: |
docker compose build
docker compose pull
- name: Test
run: docker compose run web pytest
- name: Coverage
run: |
docker compose run web coverage run -m pytest
docker compose run web coverage xml
docker compose run web coverage report --format markdown >> $GITHUB_STEP_SUMMARY
docker compose run web coverage report --fail-under 10 --format text
- name: Publish the Docker image
run: |
docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
docker tag docker.io/library/brostar-api-web ghcr.io/nens/brostar-api:main
docker push ghcr.io/nens/brostar-api:main
if: github.ref == 'refs/heads/main'
# Running this job only for main branch.
- name: Publish tag as production docker image
run: |
docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
docker tag docker.io/library/brostar-api-web ghcr.io/nens/brostar-api:production
docker push ghcr.io/nens/brostar-api:production
if: startsWith(github.event.ref, 'refs/tags')