-
Notifications
You must be signed in to change notification settings - Fork 12
81 lines (65 loc) · 2.24 KB
/
ci.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
name: CI
on:
# Trigger analysis when pushing in master or pull requests, and when creating
# a pull request.
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11']
steps:
- uses: actions/checkout@v3
with:
# Disabling shallow clone is recommended for improving relevancy of sonar reporting
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install freetds-dev libsasl2-dev libpq-dev
pip install poetry
poetry config virtualenvs.create false
- name: Install oracle dependencies
run: sudo bash toucan_connectors/install_scripts/oracle.sh
- name: Install databricks dependencies
run: sudo bash toucan_connectors/install_scripts/databricks.sh
- name: Install mssql dependencies
run: sudo bash toucan_connectors/install_scripts/mssql.sh
- name: Install mssql_TLSv1_0 dependencies
run: sudo bash toucan_connectors/install_scripts/mssql_TLSv1_0.sh
- name: Install odbc dependencies
run: sudo bash toucan_connectors/install_scripts/odbc.sh
- name: install
run: make install
- name: lint
run: make lint
- name: Cache docker images
id: cache-docker-images
uses: actions/cache@v3
with:
path: /var/lib/docker/overlay2
key: ${{ runner.os }}-docker-images
- name: Pulling all docker images
run: docker-compose -f tests/docker-compose.yml pull
- name: test
run: make test
env:
BEARER_API_KEY: ${{ secrets.BEARER_API_KEY }}
BEARER_AIRCALL_AUTH_ID: ${{ secrets.BEARER_AIRCALL_AUTH_ID }}
- name: SonarCloud Scan
# Only executed for one of the tested python version
if: ${{ always() && matrix['python-version'] == 3.10 }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}