Feature/cdk migration #2095
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test NX package | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| deploy: | |
| name: Test package building | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.14] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --immutable | |
| - name: Generate test library | |
| run: npx nx g library test-lib --directory=libs/test-lib --unitTestRunner=none | |
| - name: Generate test app | |
| run: npx nx g service test-app general | |
| # The next 2 lines are needed for nx affected to work when CI is running on a PR | |
| - name: Set base SHA to origin/main | |
| uses: nrwl/nx-set-shas@dbe0650947e5f2c81f59190a38512cf49126fe6b # v4 | |
| - name: Fetch main | |
| run: git fetch | |
| - name: Run tests | |
| run: npx nx affected -t lint, test, build --parallel=3 --base=origin/main | |
| - name: Remove test library | |
| run: npx nx g rm test-lib | |
| - name: Remove test app | |
| run: npx nx g rm test-app |