-
Notifications
You must be signed in to change notification settings - Fork 2
116 lines (104 loc) · 3 KB
/
continuous-integration-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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Continuous-Integration
on:
push:
branches: master
pull_request:
branches: [master, dev]
workflow_dispatch:
inputs:
reason:
description: 'Reason'
required: false
default: 'Manual trigger'
jobs:
Tests:
runs-on: ubuntu-latest
# Service containers to run with `container-job`
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
requirements-level: [min, pypi]
cache-service: [redis]
# services: [release, devel]
# include:
# - services: release
# EXTRAS: "all"
# REQUIREMENTS: "release"
# REQUIREMENTS_LEVEL: "pypi"
## - services: lowest
## EXTRAS: "all"
## REQUIREMENTS: "lowest"
## REQUIREMENTS_LEVEL: "min"
# - services: devel
# EXTRAS: "all"
# REQUIREMENTS: "devel"
# REQUIREMENTS_LEVEL: "dev"
env:
CACHE: ${{ matrix.cache-service }}
ES_VERSION: ${{matrix.ES_VERSION}}
EXTRAS: all #,${{ matrix.EXTRAS }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
- version: 1.2.2
- name: Install dependencies
run: |
docker --version
docker-compose --version
poetry install
- name: Run tests
run: |
poetry run ./run-tests.sh
continue-on-error: false
- name: Upload Coverage ${{ matrix.python-version }}
if: ${{ matrix.requirements-level == 'pypi' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
# COVERALLS_FLAG_NAME: test-${{ matrix.services }}
# COVERALLS_PARALLEL: true
run: |
pip install --upgrade coveralls
coveralls
# coveralls:
# needs: [python-tests]
# runs-on: ubuntu-latest
# steps:
# - name: Cancel Previous Runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ github.token }}
#
# - name: Set up Python 3.6
# uses: actions/setup-python@v2
# with:
# python-version: 3.6
#
# - name: Finished
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# COVERALLS_PARALLEL_FINISHED: true
# run: |
# pip install --upgrade coveralls
# coveralls --finish