nalgeon/iuliia-py

View on GitHub
.github/workflows/build.yml

Summary

Maintainability
Test Coverage
name: build

on:
    push:
        branches: [master]
        paths:
            - .github/**
            - iuliia/**
            - tests/**
            - Makefile
            - tox.ini
    pull_request:
        branches: [master]
    workflow_dispatch:

jobs:
    build:
        runs-on: ubuntu-latest
        strategy:
            matrix:
                python-version: [3.7, 3.8, 3.9]

        env:
            USING_COVERAGE: "3.9"

        steps:
            - name: Checkout sources
              uses: actions/checkout@v2

            - name: Set up Python
              uses: actions/setup-python@v2
              with:
                  python-version: ${{ matrix.python-version }}

            - name: Install dependencies
              run: |
                  make deps schemas
            - name: Run tox
              run: |
                  make tox
            - name: Upload coverage to Codecov
              uses: codecov/codecov-action@v1
              if: contains(env.USING_COVERAGE, matrix.python-version)
              with:
                  fail_ci_if_error: true