Skip to content

Commit 96dcf0b

Browse files
authored
Cleanup GitHub Actions (#3073)
Signed-off-by: James Talton <[email protected]>
1 parent 1edd70d commit 96dcf0b

32 files changed

+116
-999
lines changed

.github/workflows/awx-e2e.yml

Lines changed: 0 additions & 179 deletions
This file was deleted.

.github/workflows/awx-update-server.yml

Lines changed: 0 additions & 120 deletions
This file was deleted.

.github/workflows/component.yml

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,53 @@
1-
name: Pull Request
1+
name: Component
22

33
on:
44
workflow_call:
5-
secrets:
6-
COMPONENT_PROJECT_ID:
7-
required: true
8-
COMPONENT_RECORD_KEY:
5+
inputs:
6+
directory:
7+
description: 'The base directory to search for .cy.tsx files'
98
required: true
9+
type: string
10+
1011
jobs:
12+
generate-matrix:
13+
name: Generate Matrix
14+
runs-on: ubuntu-latest
15+
outputs:
16+
matrix: ${{ steps.set-matrix.outputs.MATRIX }}
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Generate matrix
22+
id: set-matrix
23+
run: |
24+
BASE_DIR="${{ inputs.directory }}"
25+
matrix=$(find "$BASE_DIR" -type f -name '*.cy.tsx' -exec dirname {} \; | sed "s|^$BASE_DIR/||" | awk -F'/' '{print $1}' | sort -u | jq -R . | jq -s -c .)
26+
echo "Matrix value: $matrix"
27+
echo "MATRIX=$matrix" >> $GITHUB_OUTPUT
28+
1129
component:
1230
name: Component
1331
runs-on: ubuntu-latest
32+
needs: generate-matrix
1433
strategy:
15-
fail-fast: true
34+
fail-fast: false
1635
matrix:
17-
task: [
18-
"awx:access",
19-
"awx:administration",
20-
"awx:common",
21-
"awx:overview",
22-
"awx:resources",
23-
"awx:views",
24-
"eda",
25-
"hub",
26-
"common",
27-
"framework"
28-
]
36+
directory: ${{ fromJson(needs.generate-matrix.outputs.MATRIX) }}
2937
steps:
3038
- name: Checkout
3139
uses: actions/checkout@v4
3240
with:
3341
fetch-depth: 1
42+
3443
- name: Setup Node
3544
uses: actions/setup-node@v4
3645
with:
3746
node-version: 20
47+
3848
- name: PreCache
3949
run: npm version 0.0.0 --no-git-tag-version
50+
4051
- name: Cache dependencies
4152
id: cache
4253
uses: actions/cache@v4
@@ -45,8 +56,14 @@ jobs:
4556
./node_modules
4657
/home/runner/.cache/Cypress
4758
key: modules-${{ hashFiles('package-lock.json') }}
59+
4860
- name: Install dependencies
4961
if: steps.cache.outputs.cache-hit != 'true'
5062
run: npm ci
51-
- name: Run Cypress component tests ${{ matrix.task }}
52-
run: npm run component:${{ matrix.task }}
63+
64+
- name: Cypress
65+
uses: cypress-io/github-action@v6
66+
with:
67+
install: false
68+
component: true
69+
spec: ${{ inputs.directory }}/${{ matrix.directory }}/**/*.cy.tsx

0 commit comments

Comments
 (0)