forked from RonaldHensbergen/composable-data-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (83 loc) · 2.73 KB
/
Copy pathci.yml
File metadata and controls
98 lines (83 loc) · 2.73 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
86
87
88
89
90
91
92
93
94
95
96
97
98
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
# Lint stays Linux-only: markdownlint and yamllint check file content, not
# OS-dependent code paths, so running them on three OSes would triple CI
# cost for zero extra signal.
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Install YAML linter
run: |
python -m pip install --upgrade pip
pip install yamllint
- name: Run Markdown lint
run: |
npx --yes markdownlint-cli@0.49.0 "**/*.md" ".github/**/*.md"
- name: Run YAML lint
run: |
yamllint .
# Core Python checks run on all three host OSes. This exercises unit tests
# plus real `cds validate/plan/render` subprocess calls (see
# tests/test_cds_workflow.py), catching cross-platform regressions in the
# CLI itself, not just on Linux.
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.14"]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Run tests
run: |
python -m unittest discover -s tests -p "test_*.py" -v
# Docker-heavy tasks stay Linux-only: Docker Desktop licensing and
# significantly slower/less reliable Docker support on GitHub's hosted
# macOS and Windows runners make this impractical to matrix. Local
# Docker Desktop on macOS/Windows is unaffected by this CI limitation.
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build all Dockerfiles
run: |
for dockerfile in $(find . -name "Dockerfile*" -type f); do
dir=$(dirname "$dockerfile")
echo "Building $dockerfile in directory $dir..."
context="$dir"
if [ "$dockerfile" = "./images/dagster/Dockerfile" ] || [ "$dockerfile" = "./images/dagster/Dockerfile.user-code" ]; then
context="."
fi
docker build -f "$dockerfile" "$context" || exit 1
done
# Force workflow re-run