Skip to content

Commit dcb0813

Browse files
ci: use one workflow (#219)
1 parent 79019d5 commit dcb0813

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@ name: ci
33
on:
44
push:
55
branches:
6-
- main
7-
pull_request:
8-
types: [opened, synchronize, reopened]
6+
- 'main'
7+
pull_request: {}
98

109
jobs:
1110
build_test_release:
1211
strategy:
1312
matrix:
14-
os: [ubuntu-latest, windows-latest]
15-
node-version: [12, 14]
13+
node-version: ${{ fromJSON(github.ref == 'refs/heads/main' && '[16]' || '[12,14,16]') }}
14+
os: ${{ fromJSON(github.ref == 'refs/heads/main' && '["ubuntu-latest"]' || '["ubuntu-latest", "windows-latest"]') }}
1615
runs-on: ${{ matrix.os }}
1716

1817
steps:
@@ -22,14 +21,14 @@ jobs:
2221
with:
2322
node-version: ${{ matrix.node-version }}
2423
- name: install
25-
run: npm install
24+
run: npm install --force
2625
- name: build
2726
run: npm run build -- --skip-nx-cache
2827
- name: test
2928
run: npm run test -- --ci --code-coverage
3029
- name: Release
31-
if: github.repository == 'testing-library/angular-testing-library' && github.ref == 'refs/heads/main' && matrix.node-version == 14 && matrix.os == 'ubuntu-latest'
30+
if: github.repository == 'testing-library/angular-testing-library' && github.ref == 'refs/heads/main'
31+
run: npx semantic-release
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
35-
run: npx semantic-release

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
},
4848
"devDependencies": {
4949
"@angular-devkit/build-angular": "12.0.0",
50-
"@angular-eslint/eslint-plugin": "~2.1.0",
51-
"@angular-eslint/eslint-plugin-template": "~2.1.0",
52-
"@angular-eslint/template-parser": "~2.1.0",
50+
"@angular-eslint/eslint-plugin": "~12.0.0",
51+
"@angular-eslint/eslint-plugin-template": "~12.0.0",
52+
"@angular-eslint/template-parser": "~12.0.0",
5353
"@angular/cli": "12.0.0",
5454
"@angular/compiler-cli": "12.0.0",
5555
"@angular/language-service": "12.0.0",
@@ -84,4 +84,4 @@
8484
"ts-node": "9.1.1",
8585
"typescript": "4.2.4"
8686
}
87-
}
87+
}

0 commit comments

Comments
 (0)