Skip to content

Commit

Permalink
Nx cloud test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jHabjanMXP committed Feb 9, 2025
1 parent 0f783f2 commit 78f5725
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 6 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- main
- develop

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -14,8 +18,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
# with:
# fetch-depth: 0
with:
fetch-depth: 50

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand All @@ -37,9 +41,18 @@ jobs:

- name: Run linter
run: pnpm run lint
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}

- name: Run tests
run: pnpm run test
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}

- name: Build Packages
run: pnpm run build-gh-pages
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}
17 changes: 15 additions & 2 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches: [ develop ]

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -13,8 +16,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
# with:
# fetch-depth: 0
with:
fetch-depth: 50

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand All @@ -36,15 +39,25 @@ jobs:

- name: Run linter
run: pnpm run lint
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}

- name: Run tests
run: pnpm run test
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}

- name: Build Packages
run: pnpm run build-gh-pages
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches: [ main ]

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -13,8 +16,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
# with:
# fetch-depth: 0
with:
fetch-depth: 50

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand All @@ -36,12 +39,21 @@ jobs:

- name: Run linter
run: pnpm run lint
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}

- name: Run tests
run: pnpm run test
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}

- name: Build Packages
run: pnpm run build-gh-pages
env:
NX_BRANCH: ${{ github.event.number }}
NX_RUN_GROUP: ${{ github.run_id }}

- name: Setup Pages
uses: actions/configure-pages@v5
Expand Down

0 comments on commit 78f5725

Please sign in to comment.