|
1 | | -name: CI |
2 | | - |
3 | | -on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
7 | | - - master |
8 | | - pull_request: {} |
9 | | - |
10 | | -concurrency: |
11 | | - group: ci-${{ github.head_ref || github.ref }} |
12 | | - cancel-in-progress: true |
13 | | - |
14 | | -jobs: |
15 | | - lint: |
16 | | - name: "Lints" |
17 | | - runs-on: ubuntu-latest |
18 | | - timeout-minutes: 10 |
19 | | - |
20 | | - steps: |
21 | | - - uses: actions/checkout@v4<% if (pnpm) { %> |
22 | | - - uses: pnpm/action-setup@v4<% } %> |
23 | | - - uses: actions/setup-node@v4 |
24 | | - with: |
25 | | - node-version: 22 |
26 | | - cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %> |
27 | | - - name: Install Dependencies |
28 | | - run: <%= pnpm ? 'pnpm install --frozen-lockfile' : yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %> |
29 | | - - name: Lint |
30 | | - run: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm run' %> lint |
31 | | - |
32 | | - test: |
33 | | - name: "Tests" |
34 | | - runs-on: ubuntu-latest |
35 | | - timeout-minutes: 10 |
36 | | - outputs: |
37 | | - matrix: ${{ steps.set-matrix.outputs.matrix }} |
38 | | - |
39 | | - steps: |
40 | | - - uses: actions/checkout@v4<% if (pnpm) { %> |
41 | | - - uses: pnpm/action-setup@v4<% } %> |
42 | | - - uses: actions/setup-node@v4 |
43 | | - with: |
44 | | - node-version: 22 |
45 | | - cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %> |
46 | | - - name: Install Dependencies |
47 | | - run: <%= pnpm ? 'pnpm install --frozen-lockfile' : yarn ? 'yarn install --frozen-lockfile' : 'npm ci' %> |
48 | | - - name: Run Tests |
49 | | - run: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm run' %> test |
50 | | - # For the Try Scenarios |
51 | | - - id: set-matrix |
52 | | - run: | |
53 | | - <% if (pnpm) { %> echo "matrix=$(pnpm -s dlx @embroider/try list)" >> $GITHUB_OUTPUT<% } %> |
54 | | - <% if (npm) { %> echo "matrix=$(npx @embroider/try list)" >> $GITHUB_OUTPUT<% } %> |
55 | | -
|
56 | | - floating: |
57 | | - name: "Floating Dependencies" |
58 | | - runs-on: ubuntu-latest |
59 | | - timeout-minutes: 10 |
60 | | - |
61 | | - steps: |
62 | | - - uses: actions/checkout@v4<% if (pnpm) { %> |
63 | | - - uses: pnpm/action-setup@v4<% } %> |
64 | | - - uses: actions/setup-node@v4 |
65 | | - with: |
66 | | - node-version: 22 |
67 | | - cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %> |
68 | | - - name: Install Dependencies |
69 | | - run: <%= pnpm ? 'pnpm install --no-lockfile' : yarn ? 'yarn install --no-lockfile' : 'npm install --no-package-lock' %> |
70 | | - - name: Run Tests |
71 | | - run: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm run' %> test |
72 | | - |
73 | | - try-scenarios: |
74 | | - name: ${{ matrix.name }} |
75 | | - runs-on: ubuntu-latest |
76 | | - needs: "test" |
77 | | - timeout-minutes: 10 |
78 | | - strategy: |
79 | | - fail-fast: false |
80 | | - matrix: ${{fromJson(needs.test.outputs.matrix)}} |
81 | | - |
82 | | - steps: |
83 | | - - uses: actions/checkout@v4<% if (pnpm) { %> |
84 | | - - uses: pnpm/action-setup@v4<% } %> |
85 | | - - uses: actions/setup-node@v4 |
86 | | - with: |
87 | | - node-version: 22 |
88 | | - cache: <%= pnpm ? 'pnpm' : yarn ? 'yarn' : 'npm' %> |
89 | | - - name: Apply Scenario |
90 | | - run: | |
91 | | - <% if (pnpm) { %> pnpm dlx @embroider/try apply ${{ matrix.name }}<% } %> |
92 | | - <% if (npm) { %> npx @embroider/try apply ${{ matrix.name }}<% } %> |
93 | | - - name: Install Dependencies |
94 | | - run: <%= pnpm ? 'pnpm install --no-lockfile' : yarn ? 'yarn install --no-lockfile' : 'npm install --no-package-lock' %> |
95 | | - - name: Run Tests |
96 | | - run: | |
97 | | - <% if (pnpm) { %>pnpm test<% } %> |
98 | | - <% if (npm) { %>npm test<% } %> |
99 | | - env: ${{ matrix.env }} |
| 1 | +# Replaced from src/.github, based on selected packageManager |
0 commit comments