Repository navigation
62 lines (53 loc) · 1.86 KB
/
Copy pathci.yml
File metadata and controls
62 lines (53 loc) · 1.86 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
name: CI
on:
push:
branches: [main]
pull_request:
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
# `quonfig` resolves from PyPI, so only the repo itself and the shared
# test corpus need checking out.
- name: Checkout openfeature-python
uses: actions/checkout@v4
with:
path: openfeature-python
# The conformance + integration test suites run against the shared
# ``integration-test-data`` corpus. Mirror openfeature-go's CI by
# checking it out as a sibling — the test fixtures resolve it via a
# relative path from the test file location.
- name: Checkout integration-test-data sibling
uses: actions/checkout@v4
with:
repository: quonfig/integration-test-data
path: integration-test-data
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: pipx install poetry==1.8.3
- name: Install dependencies
working-directory: openfeature-python
run: poetry install --no-interaction
- name: Lint
working-directory: openfeature-python
run: poetry run ruff check .
- name: Ruff format check
working-directory: openfeature-python
run: poetry run ruff format --check .
- name: Unit tests
working-directory: openfeature-python
run: poetry run pytest tests/unit -v
- name: Conformance tests
working-directory: openfeature-python
run: poetry run pytest tests/conformance -v
- name: Integration tests
working-directory: openfeature-python
run: poetry run pytest tests/integration -v