Repository navigation
85 lines (81 loc) · 3.02 KB
/
Copy pathci.yml
File metadata and controls
85 lines (81 loc) · 3.02 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
77
78
79
80
81
82
83
84
85
name: CI
on:
pull_request:
push:
branches: [main]
# Automatically stop old builds on the same branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: Lint
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# needed for 'pre-commit-mirrors-insert-license'
fetch-depth: 0
- name: Set up pixi
uses: prefix-dev/setup-pixi@d3f436a425481402e6a95a1d1fc10331c708cd9e # v0.10.2
with:
environments: default default-py310
- name: Install Rust
run: rustup show
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Run linting
run: pixi run lint
env:
CLICOLOR_FORCE: 1
unit-tests:
name: Unit Tests (${{ contains(matrix.os, 'ubuntu') && 'Linux' || (contains(matrix.os, 'windows') && 'Windows' || 'macOS') }}) - ${{ matrix.environment }}
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
environment: [py310, py311, py312, py313, py314]
with_optionals: [false]
include:
# Test with optional dependencies across OSes
- os: ubuntu-latest
environment: py314-optionals
with_optionals: true
- os: windows-latest
environment: py314-optionals
with_optionals: true
- os: macos-latest
environment: py314-optionals
with_optionals: true
# Test polars backward compatibility, only one OS
- os: ubuntu-latest
environment: polars-minimal
with_optionals: false
steps:
- name: Checkout branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Set up pixi
uses: prefix-dev/setup-pixi@d3f436a425481402e6a95a1d1fc10331c708cd9e # v0.10.2
with:
environments: ${{ matrix.environment }}
# FIXME: Remove when `s3_server` fixture does not start a process anymore
post-cleanup: ${{ matrix.os != 'windows-latest' }}
- name: Install Rust
run: rustup show
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- name: Install repository
run: pixi run -e ${{ matrix.environment }} postinstall
- name: Run pytest
run: pixi run -e ${{ matrix.environment }} test-coverage --color=yes ${{ matrix.with_optionals && '-m with_optionals' || '-m "not with_optionals"'}} --cov=dataframely --cov-report=xml
- name: Upload codecov
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}