forked from zappa/Zappa
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.63 KB
/
ci.yaml
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
46
47
48
49
50
51
52
53
name: CI
on: # yamllint disable-line rule:truthy
pull_request:
branches: ["master"]
push:
branches: ["master"]
jobs:
test:
runs-on: ubuntu-20.04
strategy:
matrix:
python: [3.7, 3.8, 3.9, "3.10"]
steps:
- name: Checkout Code Repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip${{ matrix.python }}-${{ hashFiles('Pipfile') }}
restore-keys: ${{ runner.os }}-pip${{ matrix.python }}-
- name: make sure we have version tags
run: git fetch --unshallow --tags
- name: Setup Virtualenv
run: python -m venv .venv
- name: Install
run: source .venv/bin/activate && make requirements && python setup.py install
- name: Lint
run: source .venv/bin/activate && make flake black-check isort-check
- name: Test
run: source .venv/bin/activate && make tests
- name: Upload Coverage
run: .venv/bin/coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: py${{ matrix.python }}
COVERALLS_PARALLEL: true
coverage:
needs: test
runs-on: ubuntu-20.04
steps:
- name: Set up Python
uses: actions/setup-python@v2
- name: Finalise Coverage
run: pip3 install --upgrade coveralls && coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}