diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 853f8977..87e99fb4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,16 +3,15 @@ name: ci on: push: branches: - - main - pull_request: - types: [opened, synchronize, reopened] + - 'main' + pull_request: {} jobs: build_test_release: strategy: matrix: - os: [ubuntu-latest, windows-latest] - node-version: [12, 14] + node-version: ${{ fromJSON(github.ref == 'refs/heads/main' && '[16]' || '[12,14,16]') }} + os: ${{ fromJSON(github.ref == 'refs/heads/main' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest"]') }} runs-on: ${{ matrix.os }} steps: @@ -22,14 +21,14 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: install - run: npm install + run: npm install --force - name: build run: npm run build -- --skip-nx-cache - name: test run: npm run test -- --ci --code-coverage - name: Release - if: github.repository == 'testing-library/angular-testing-library' && github.ref == 'refs/heads/main' && matrix.node-version == 14 && matrix.os == 'ubuntu-latest' + if: github.repository == 'testing-library/angular-testing-library' && github.ref == 'refs/heads/main' + run: npx semantic-release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - run: npx semantic-release diff --git a/package.json b/package.json index d9a00217..4da647a9 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,9 @@ }, "devDependencies": { "@angular-devkit/build-angular": "12.0.0", - "@angular-eslint/eslint-plugin": "~2.1.0", - "@angular-eslint/eslint-plugin-template": "~2.1.0", - "@angular-eslint/template-parser": "~2.1.0", + "@angular-eslint/eslint-plugin": "~12.0.0", + "@angular-eslint/eslint-plugin-template": "~12.0.0", + "@angular-eslint/template-parser": "~12.0.0", "@angular/cli": "12.0.0", "@angular/compiler-cli": "12.0.0", "@angular/language-service": "12.0.0", @@ -84,4 +84,4 @@ "ts-node": "9.1.1", "typescript": "4.2.4" } -} \ No newline at end of file +}