Skip to content

Update serialization logic & fix tests (WiP) #5250

Update serialization logic & fix tests (WiP)

Update serialization logic & fix tests (WiP) #5250

Workflow file for this run

name: CI
on:
push:
pull_request:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
PIPENV_VENV_IN_PROJECT: 1
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
PYMONGOIM__MONGO_VERSION: 4.4
PYMONGOIM__OPERATING_SYSTEM: ubuntu
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "pypy-3.9"]
name: Test Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install
id: install
run: |
pip install poetry
poetry install --no-root
- name: Lint
if: success() || steps.install.outcome == 'success'
run: poetry run ruff check ebl
- name: Code Style
if: success() || steps.install.outcome == 'success'
run: poetry run ruff format --check ebl
- name: Type Check
if: success() || steps.install.outcome == 'success'
run: poetry run pyre check
- name: Download
run: poetry run python -m ebl.tests.downloader
- name: Unit Tests
if: ${{ startsWith(matrix.python-version, 'pypy') }}
env:
CI: true
run: poetry run pytest
- name: Unit Tests with Coverage
uses: paambaati/codeclimate-action@v3.0.0
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: poetry run pytest --cov=ebl --cov-report term --cov-report xml
docker:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ebl.badw.de
username: ${{ secrets.EBL_REGISTRY_USERNAME }}
password: ${{ secrets.EBL_REGISTRY_PASSWORD }}
- id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: |
ebl.badw.de/ebl-api:master
${{format('ebl.badw.de/ebl-api:master.{0}', github.run_number)}}