-
Notifications
You must be signed in to change notification settings - Fork 24
76 lines (73 loc) · 2.02 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
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: Test target-snowflake
on:
push:
branches: [main]
paths:
- .github/workflows/test.yml
- target_snowflake/**
- tests/**
- poetry.lock
- pyproject.toml
- tox.ini
pull_request:
branches: [main]
paths:
- .github/workflows/test.yml
- target_snowflake/**
- tests/**
- poetry.lock
- pyproject.toml
- tox.ini
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
pytest:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
SINGER_SDK_LOG_CONFIG: ./target_snowflake_logging.yaml
TARGET_SNOWFLAKE_USER: ${{secrets.TARGET_SNOWFLAKE_USER}}
TARGET_SNOWFLAKE_PASSWORD: ${{secrets.TARGET_SNOWFLAKE_PASSWORD}}
TARGET_SNOWFLAKE_ACCOUNT: ${{secrets.TARGET_SNOWFLAKE_ACCOUNT}}
TARGET_SNOWFLAKE_DATABASE: ${{secrets.TARGET_SNOWFLAKE_DATABASE}}
TARGET_SNOWFLAKE_WAREHOUSE: ${{secrets.TARGET_SNOWFLAKE_WAREHOUSE}}
TARGET_SNOWFLAKE_ROLE: ${{secrets.TARGET_SNOWFLAKE_ROLE}}
strategy:
fail-fast: false
max-parallel: 2
matrix:
python-version:
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
os:
- ubuntu-latest
include:
- python-version: "3.12"
os: "macos-latest"
- python-version: "3.12"
os: "windows-latest"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
pip install poetry
- name: Install dependencies
run: |
poetry env use python${{ matrix.python-version }}
poetry install
- name: Test with pytest
run: |
poetry run pytest -n auto
- uses: actions/upload-artifact@v4
with:
name: snowflake-logs-py${{ matrix.python-version }}-${{ matrix.os }}
path: snowflake.log