CI / CD Pipeline

The bohicalog module is built and tested automatically by the CI / CD pipeline. The pipeline is defined in the .gitlab-ci.yml file. The pipeline is triggered by a push to the master branch. The pipeline consists of the following stages:

  • lint: runs the linter(s) on the code

  • docs: runs the linter(s) on the documentation

  • test: runs the unit tests

Github Action File

The full test.yml is listed below:

 1name: Tests
 2
 3on:
 4  push:
 5    branches: [ main, develop ]
 6  pull_request:
 7    branches: [ main ]
 8
 9jobs:
10  lint:
11    name: Lint
12    runs-on: ubuntu-latest
13    strategy:
14      matrix:
15        python-version: [ "3.8"]
16    steps:
17      - uses: actions/checkout@v2
18      - name: Set up Python ${{ matrix.python-version }}
19        uses: actions/setup-python@v2
20        with:
21          python-version: ${{ matrix.python-version }}
22      - name: Install dependencies
23        run: |
24          sudo apt-get install graphviz
25          pip install tox
26      - name: Check manifest
27        run: tox run -e manifest
28      #- name: Check code quality with flake8
29      #  run: tox run -e flake8
30      - name: Check package metadata with Pyroma
31        run: tox run -e pyroma
32      - name: Check static typing with MyPy
33        run: tox run -e mypy
34  docs:
35    name: Documentation
36    runs-on: ubuntu-latest
37    strategy:
38      matrix:
39        python-version: [ "3.8"]
40    steps:
41      - uses: actions/checkout@v2
42      - name: Set up Python ${{ matrix.python-version }}
43        uses: actions/setup-python@v2
44        with:
45          python-version: ${{ matrix.python-version }}
46      - name: Install dependencies
47        run: |
48          pip install tox
49          sudo apt-get install graphviz
50      - name: Check RST conformity with doc8
51        run: tox run -e doc8
52      - name: Check docstring coverage
53        run: tox run -e docstr-coverage
54      - name: Check documentation build with Sphinx
55        run: tox run -e docs-test
56  tests:
57    name: Tests
58    runs-on: ${{ matrix.os }}
59    strategy:
60      matrix:
61        os: [ ubuntu-latest ]
62        python-version: [ "3.8"]
63    steps:
64      - uses: actions/checkout@v2
65      - name: Set up Python ${{ matrix.python-version }}
66        uses: actions/setup-python@v2
67        with:
68          python-version: ${{ matrix.python-version }}
69      - name: Install dependencies
70        run: pip install tox
71      - name: Test with pytest and generate coverage file
72        run:
73          tox run -e py
74      - name: Upload coverage report to codecov
75        uses: codecov/codecov-action@v1
76        if: success()
77        with:
78          file: coverage.xml