forked from testcontainers/testcontainers-python
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (44 loc) · 1.63 KB
/
Copy pathmain.yml
File metadata and controls
45 lines (44 loc) · 1.63 KB
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
name: testcontainers-python
on:
push:
branches: [ '*' ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8]
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache Python dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles(format('requirements/{0}.txt', matrix.python-version)) }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install system requirements
run: |
sudo apt-get install -y --no-install-recommends unixodbc-dev # required for pyodbc
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get -qq update
sudo ACCEPT_EULA=Y apt-get -y install msodbcsql17
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -r requirements/${{ matrix.python-version }}.txt
- name: Run checks
run: |
flake8
sphinx-build -nW docs docs/_build/html
py.test -sv --cov-config .coveragerc --cov-report html:skip-covered --cov-report term:skip-covered --cov=testcontainers --tb=short tests/
codecov