|
15 | 15 | name: 🪿
|
16 | 16 |
|
17 | 17 | on:
|
18 |
| - push: |
19 |
| - branches: main |
20 |
| - pull_request: |
21 |
| - workflow_dispatch: # Manual runs |
22 |
| - |
23 |
| -env: |
24 |
| - PROJECT: jss-22p1-test |
25 |
| - WORKLOAD_IDENTITY_PROVIDER: projects/886556137211/locations/global/workloadIdentityPools/github-actions/providers/github-actions-python |
| 18 | + workflow_run: |
| 19 | + workflows: ["🔍"] |
| 20 | + types: ["completed"] |
26 | 21 |
|
27 | 22 | jobs:
|
28 |
| - affected: |
29 |
| - name: Finding affected tests |
| 23 | + test: |
30 | 24 | runs-on: ubuntu-latest
|
31 |
| - outputs: |
32 |
| - python: ${{steps.python.outputs.affected}} |
33 |
| - defaults: |
34 |
| - run: |
35 |
| - working-directory: .github/testing |
36 | 25 | steps:
|
37 |
| - - uses: actions/checkout@v4 |
38 |
| - with: |
39 |
| - fetch-depth: 0 |
40 |
| - - uses: oven-sh/setup-bun@v2 |
41 |
| - - run: bun install |
42 |
| - - id: python |
43 |
| - run: | |
44 |
| - AFFECTED_PYTHON=$(bun run affected python HEAD origin/main) |
45 |
| - echo "$AFFECTED_PYTHON" |
46 |
| - echo "affected=$AFFECTED_PYTHON" >> "$GITHUB_OUTPUT" |
| 26 | + - run: echo "Running tests" |
47 | 27 |
|
48 |
| - python-lint: |
49 |
| - name: Lint Python |
50 |
| - needs: affected |
51 |
| - runs-on: ubuntu-latest |
52 |
| - strategy: |
53 |
| - matrix: |
54 |
| - affected: ${{fromJson(needs.affected.outputs.python)}} |
55 |
| - defaults: |
56 |
| - run: |
57 |
| - working-directory: .github/testing |
58 |
| - steps: |
59 |
| - - uses: actions/checkout@v4 |
60 |
| - - uses: oven-sh/setup-bun@v2 |
61 |
| - - uses: actions/setup-python@v5 |
62 |
| - with: |
63 |
| - python-version: '3.12' |
64 |
| - - run: pip install nox |
65 |
| - - run: bun install |
66 |
| - - run: bun run ci-lint python AFFECTED |
67 |
| - env: |
68 |
| - AFFECTED: ${{toJson(matrix.affected)}} |
| 28 | +# on: |
| 29 | +# push: |
| 30 | +# branches: main |
| 31 | +# pull_request: |
| 32 | +# workflow_dispatch: # Manual runs |
69 | 33 |
|
70 |
| - python-test: |
71 |
| - name: Test Python |
72 |
| - needs: affected |
73 |
| - runs-on: ubuntu-latest |
74 |
| - strategy: |
75 |
| - matrix: |
76 |
| - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] |
77 |
| - affected: ${{fromJson(needs.affected.outputs.python)}} |
78 |
| - permissions: # needed for google-github-actions/auth |
79 |
| - id-token: write |
80 |
| - contents: read |
81 |
| - defaults: |
82 |
| - run: |
83 |
| - working-directory: .github/testing |
84 |
| - steps: |
85 |
| - - uses: actions/checkout@v4 |
86 |
| - - uses: oven-sh/setup-bun@v2 |
87 |
| - - uses: actions/setup-python@v5 |
88 |
| - with: |
89 |
| - python-version: ${{matrix.python-version}} |
90 |
| - - uses: 'google-github-actions/auth@v2' |
91 |
| - with: |
92 |
| - project_id: ${{env.PROJECT}} |
93 |
| - workload_identity_provider: ${{env.WORKLOAD_IDENTITY_PROVIDER}} |
94 |
| - - run: pip install nox |
95 |
| - - run: bun install |
96 |
| - - run: bun run ci-test python${{matrix.python-version}} AFFECTED |
97 |
| - env: |
98 |
| - AFFECTED: ${{toJson(matrix.affected)}} |
| 34 | +# env: |
| 35 | +# PROJECT: jss-22p1-test |
| 36 | +# WORKLOAD_IDENTITY_PROVIDER: projects/886556137211/locations/global/workloadIdentityPools/github-actions/providers/github-actions-python |
| 37 | + |
| 38 | +# jobs: |
| 39 | +# affected: |
| 40 | +# name: Finding affected tests |
| 41 | +# runs-on: ubuntu-latest |
| 42 | +# outputs: |
| 43 | +# python: ${{steps.python.outputs.affected}} |
| 44 | +# defaults: |
| 45 | +# run: |
| 46 | +# working-directory: .github/testing |
| 47 | +# steps: |
| 48 | +# - uses: actions/checkout@v4 |
| 49 | +# with: |
| 50 | +# fetch-depth: 0 |
| 51 | +# - uses: oven-sh/setup-bun@v2 |
| 52 | +# - run: bun install |
| 53 | +# - id: python |
| 54 | +# run: | |
| 55 | +# AFFECTED_PYTHON=$(bun run affected python HEAD origin/main) |
| 56 | +# echo "$AFFECTED_PYTHON" |
| 57 | +# echo "affected=$AFFECTED_PYTHON" >> "$GITHUB_OUTPUT" |
| 58 | + |
| 59 | +# python-lint: |
| 60 | +# name: Lint Python |
| 61 | +# needs: affected |
| 62 | +# runs-on: ubuntu-latest |
| 63 | +# strategy: |
| 64 | +# matrix: |
| 65 | +# affected: ${{fromJson(needs.affected.outputs.python)}} |
| 66 | +# defaults: |
| 67 | +# run: |
| 68 | +# working-directory: .github/testing |
| 69 | +# steps: |
| 70 | +# - uses: actions/checkout@v4 |
| 71 | +# - uses: oven-sh/setup-bun@v2 |
| 72 | +# - uses: actions/setup-python@v5 |
| 73 | +# with: |
| 74 | +# python-version: '3.12' |
| 75 | +# - run: pip install nox |
| 76 | +# - run: bun install |
| 77 | +# - run: bun run ci-lint python AFFECTED |
| 78 | +# env: |
| 79 | +# AFFECTED: ${{toJson(matrix.affected)}} |
| 80 | + |
| 81 | +# python-test: |
| 82 | +# name: Test Python |
| 83 | +# needs: affected |
| 84 | +# runs-on: ubuntu-latest |
| 85 | +# strategy: |
| 86 | +# matrix: |
| 87 | +# python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] |
| 88 | +# affected: ${{fromJson(needs.affected.outputs.python)}} |
| 89 | +# permissions: # needed for google-github-actions/auth |
| 90 | +# id-token: write |
| 91 | +# contents: read |
| 92 | +# defaults: |
| 93 | +# run: |
| 94 | +# working-directory: .github/testing |
| 95 | +# steps: |
| 96 | +# - uses: actions/checkout@v4 |
| 97 | +# - uses: oven-sh/setup-bun@v2 |
| 98 | +# - uses: actions/setup-python@v5 |
| 99 | +# with: |
| 100 | +# python-version: ${{matrix.python-version}} |
| 101 | +# - uses: 'google-github-actions/auth@v2' |
| 102 | +# with: |
| 103 | +# project_id: ${{env.PROJECT}} |
| 104 | +# workload_identity_provider: ${{env.WORKLOAD_IDENTITY_PROVIDER}} |
| 105 | +# - run: pip install nox |
| 106 | +# - run: bun install |
| 107 | +# - run: bun run ci-test python${{matrix.python-version}} AFFECTED |
| 108 | +# env: |
| 109 | +# AFFECTED: ${{toJson(matrix.affected)}} |
0 commit comments