-
Notifications
You must be signed in to change notification settings - Fork 2
70 lines (59 loc) · 1.66 KB
/
test.yml
File metadata and controls
70 lines (59 loc) · 1.66 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
name: "units-test"
on:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
# unit tests
units:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: npm ci
- run: npm test
# test action works running from the graph
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./
id: discover
with:
root-dir: ./test-fixtures/multi-project
outputs:
projects-by-command: ${{ steps.discover.outputs.projects-by-command }}
build-python-projects:
name: "Test: ${{ matrix.project.name }}"
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
project: ${{ fromJson(needs.test.outputs.projects-by-command).install }}
defaults:
run:
shell: bash
working-directory: ${{ matrix.project.directory }}
steps:
- name: Check out code
uses: actions/checkout@v6
- name: Dump project object
run: |
echo '${{ toJson(matrix.project) }}'
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version-file: ${{ matrix.project.path }}
- run: pipx install poetry==1.8.2
- run: pipx inject poetry poetry-plugin-bundle==1.3.0
- run: pipx install pdm==2.12.3
- run: pipx install poethepoet==0.25.0
- name: Install project
if: matrix.project.commands.install
run: ${{ matrix.project.commands.install }}
- name: Test project
run: ${{ matrix.project.commands.test }}
- name: Package project
if: matrix.project.commands.package
run: ${{ matrix.project.commands.package }}