-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.43 KB
/
ci.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
# This workflow runs tests and sends a coverage report to Coveralls
# Requirements: Calling repo must use pipenv for dependency management, contain a
# .python-version file, and contain a Makefile with `make test` and `make coveralls`
# commands.
name: CI
on: push
jobs:
test:
name: Run tests and report coverage
runs-on: ubuntu-latest
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
steps:
- uses: actions/checkout@v3
- name: Get python version
run: |
python_version=$(cat .python-version)
echo "python_version=${python_version}" >> $GITHUB_ENV
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: ${{ env.python_version }}
architecture: x64
- name: Install
run: |
python -m pip install --upgrade pip pipenv
pipenv install --dev
- name: Run tests and make coverage report
run: |
make test
make coveralls
- name: Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lint:
uses: mitlibraries/.github/.github/workflows/python-shared-lint.yml@main