-
Notifications
You must be signed in to change notification settings - Fork 68
75 lines (63 loc) · 2 KB
/
test_meltano_add_install.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
name: Test Meltano add/install
on:
push:
branches: [main]
paths: [_data/meltano/*/*/*.yml]
pull_request:
branches: [main]
paths: [_data/meltano/*/*/*.yml]
jobs:
get_changed_plugins:
name: Get changed plugins
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed_plugins.outputs.all_changed_files }}
steps:
- name: Checkout the repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Get changed plugins
id: changed_plugins
uses: tj-actions/[email protected]
with:
files: _data/meltano/*/*/*.yml
matrix: true
test:
name: Install plugin with Meltano
runs-on: ubuntu-latest
needs: get_changed_plugins
strategy:
matrix:
file: ${{ fromJSON(needs.get_changed_plugins.outputs.matrix) }}
fail-fast: false
steps:
- name: Checkout the repository
uses: actions/[email protected]
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: ">=0.4.30"
- name: Install Meltano
run: uv tool install meltano
- name: Setup test project
run: meltano init --no-usage-stats test-project
- name: Configure Meltano
working-directory: test-project
run: |
meltano config meltano set cli.log_level debug
meltano config meltano set venv.backend uv
- name: Test add
working-directory: test-project
run: |
ref=https://raw.githubusercontent.com/meltano/hub/${{ github.event.pull_request.head.sha || github.sha }}/${{ matrix.file }}
type=$(basename $(dirname $(dirname ${{ matrix.file }})))
name=$(basename $(dirname ${{ matrix.file }}))
meltano add --no-install --from-ref $ref $type $name
- name: Test install
working-directory: test-project
run: meltano install