-
Notifications
You must be signed in to change notification settings - Fork 33
76 lines (63 loc) · 2.15 KB
/
tests.yml
File metadata and controls
76 lines (63 loc) · 2.15 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
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
name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
test:
name: "Python: ${{ matrix.python-version }}
SQLA: ${{ matrix.sqla-version }}
on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-2019]
python-version: ['3.7', '3.8', '3.9', '3.10']
cratedb-version: ['4.8.0']
sqla-version: ['1.3.24']
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Adjust environment for macOS
if: matrix.os == 'macos-latest'
run: |
brew install gnu-getopt
echo "/usr/local/opt/gnu-getopt/bin" >> $GITHUB_PATH
- name: Install dependencies
shell: bash
run: |
./devtools/setup_ci.sh --cratedb-version=${{ matrix.cratedb-version }} --sqlalchemy-version=${{ matrix.sqla-version }}
- name: Fix Windows environment
if: matrix.os == 'windows-2019'
shell: bash
run: |
# Disable firewall.
netsh advfirewall set allprofiles state off
# Reset IP stack.
netsh winsock reset
# Disable IPv6.
# https://superuser.com/questions/1545288/disable-ipv6-connectivity-on-windows-without-restarting-the-computer
netsh interface teredo set state disabled
netsh interface ipv6 6to4 set state state=disabled undoonstop=disabled
netsh interface ipv6 isatap set state state=disabled
- name: Invoke tests
shell: bash
run: |
bin/flake8
test_program=bin/test
if [ ${{ matrix.os }} = "windows-2019" ]; then
test_program=bin/test-script.py
fi
bin/coverage run $test_program -vv1
bin/coverage xml
# https://github.com/codecov/codecov-action
- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true