Skip to content

Commit 5eb3957

Browse files
authored
ci: test plugin with the next version of Nx (#496)
1 parent 121d443 commit 5eb3957

File tree

3 files changed

+69
-3
lines changed

3 files changed

+69
-3
lines changed

.github/actions/migrate/action.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Migrate Nx Workspace
2+
description: Migrate Nx Workspace to the specified version
3+
inputs:
4+
nx-version:
5+
description: Nx version to try to migrate
6+
required: true
7+
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Migrate
12+
shell: bash
13+
run: |
14+
npx nx migrate {nx-version}
15+
npm install --force --ignore-scripts
16+
npx nx migrate --run-migrations --if-exists

.github/workflows/test-nx-next.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Test nx@next
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
- cron: '0 0 * * *' # daily at 00:00
6+
7+
jobs:
8+
lint-next:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: ./.github/actions/setup
13+
- uses: ./.github/actions/migrate
14+
with:
15+
nx-version: 'next'
16+
- name: Lint
17+
run: npx nx lint
18+
19+
build-next:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- uses: ./.github/actions/setup
24+
- uses: ./.github/actions/migrate
25+
with:
26+
nx-version: 'next'
27+
- name: Build
28+
run: npx nx build
29+
30+
test-next:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v3
34+
- uses: ./.github/actions/setup
35+
- uses: ./.github/actions/migrate
36+
with:
37+
nx-version: 'next'
38+
- name: Test
39+
run: npx nx test
40+
41+
e2e-next:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v3
45+
- uses: ./.github/actions/setup
46+
- uses: ./.github/actions/migrate
47+
with:
48+
nx-version: 'next'
49+
- name: E2E Test
50+
run: npx nx e2e ngx-deploy-npm-e2e

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
![Windows][windows-image]
1616

1717
[![Publishment Status][publishment-image]][publishment-link]
18-
[![Tests @next version nrwl and angular][next-tests-image]][next-tests-link]
18+
[![Test nx@next][next-tests-image]][next-tests-link]
1919

2020
## Supported Library Generators
2121

@@ -39,7 +39,7 @@
3939
[conventional-commits-image]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg
4040
[downloads-image]: https://img.shields.io/npm/dm/ngx-deploy-npm
4141
[supported-node-versions]: https://img.shields.io/badge/node-v14%20v16%20v18-green
42-
[next-tests-image]: https://github.com/bikecoders/ngx-deploy-npm/actions/workflows/next-test.yml/badge.svg
42+
[next-tests-image]: https://github.com/bikecoders/ngx-deploy-npm/actions/workflows/test-nx-next.yml/badge.svg
4343
[linux-image]: https://img.shields.io/badge/Linux-FCC624?style=flat&logo=linux&logoColor=black
4444
[macos-image]: https://img.shields.io/badge/mac%20os-000000?style=flat&logo=macos&logoColor=F0F0F0
4545
[windows-image]: https://img.shields.io/badge/Windows-0078D6?style=flat&logo=windows&logoColor=white
@@ -62,7 +62,7 @@
6262
[npm-url]: https://www.npmjs.com/package/ngx-deploy-npm
6363
[mit-licence-url]: http://opensource.org/licenses/MIT
6464
[conventional-commits-url]: https://conventionalcommits.org
65-
[next-tests-link]: https://github.com/bikecoders/ngx-deploy-npm/actions/workflows/next-test.yml
65+
[next-tests-link]: https://github.com/bikecoders/ngx-deploy-npm/actions/workflows/test-nx-next.yml
6666

6767
<!-- Projects -->
6868

0 commit comments

Comments
 (0)