-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.49 KB
/
test.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
46
name: test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports: ["6379:6379"]
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install -U pip poetry
./scripts/install
- name: mypy
run: |
./scripts/mypy
- name: Test
run: |
./scripts/test -v --liveapi
env:
TEST_GITLAB_API_TOKEN: ${{ secrets.TEST_GITLAB_API_TOKEN }}
TEST_BITBUCKET_API_USERNAME: ${{ secrets.TEST_BITBUCKET_API_USERNAME }}
TEST_BITBUCKET_API_PASSWORD: ${{ secrets.TEST_BITBUCKET_API_PASSWORD }}
TEST_GITHUB_API_TOKEN: ${{ secrets.TEST_GITHUB_API_TOKEN }}
- name: Install commitstat
run: curl https://raw.githubusercontent.com/dropseed/commitstat/master/install.sh | bash -s -- -b $HOME/bin
- name: Run commitstat
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: |
$HOME/bin/commitstat .reports/mypy/index.txt --regex "\| Total\s*\|\s*([\d\.]+%)" --goal decrease --name mypy
$HOME/bin/commitstat .reports/pytest/index.html --regex "<span class=\"pc_cov\">(\d+%)<\/span>" --goal increase --name pytest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}