-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (41 loc) · 1.23 KB
/
testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# automatically runs pytest to test the length conversion program whenever code is pushed to github
name: test-conversion-program
on:
workflow_dispatch:
push:
pull_request:
branches:
- main
jobs:
run-pytest-only:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
container:
image: ghcr.io/${{ github.repository }}/learn-maintenance-image-${{ matrix.python-version }}:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- run: python --version
- run: pytest
run-coveralls:
runs-on: ubuntu-latest
container:
image: ghcr.io/${{ github.repository }}/learn-maintenance-image-3.7:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- run: python --version
- run: coverage run -m --source=. pytest
- run: coverage lcov
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@master
with:
path-to-lcov: ./coverage.lcov
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: coverage report