Skip to content

Commit a0d6893

Browse files
authored
ci: decomposition CI/CD pipelines (#46)
1 parent 2c9a7e9 commit a0d6893

File tree

10 files changed

+85
-87
lines changed

10 files changed

+85
-87
lines changed

.github/workflows/build.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Build
2+
on: [pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- name: Setup Node.js and Cache
10+
uses: ./.github/actions/nodejs
11+
12+
- name: Build demo
13+
run: npm run build
14+
15+
concurrency:
16+
group: build-${{ github.head_ref }}
17+
cancel-in-progress: true

.github/workflows/ci.yml

-22
This file was deleted.

.github/workflows/deploy.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Setup Node.js and Cache
13+
uses: ./.github/actions/nodejs
14+
15+
- name: Build demo
16+
run: npm run build
17+
18+
- name: Deploy
19+
uses: JamesIves/github-pages-deploy-action@v4.2.5
20+
with:
21+
branch: gh-pages
22+
folder: dist/demo/browser
23+
silent: false
24+
clean: true
25+
26+
concurrency:
27+
group: deploy-${{ github.head_ref }}
28+
cancel-in-progress: true

.github/workflows/test.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Unit tests
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Setup Node.js and Cache
14+
uses: ./.github/actions/nodejs
15+
16+
- name: Run tests
17+
run: npm run test -- --code-coverage=true
18+
19+
- uses: codecov/codecov-action@v2
20+
with:
21+
directory: ./coverage
22+
flags: summary
23+
name: demo
24+
25+
concurrency:
26+
group: test-${{ github.head_ref }}
27+
cancel-in-progress: true

angular.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"index": "projects/demo/src/index.html",
2020
"main": "projects/demo/src/main.browser.ts",
2121
"polyfills": "projects/demo/src/polyfills.ts",
22-
"tsConfig": "tsconfig.json",
22+
"tsConfig": "projects/demo/tsconfig.app.json",
2323
"aot": false,
2424
"assets": ["projects/demo/src/favicon.ico"],
2525
"styles": ["projects/demo/src/styles.css"],

browserslist

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# we only want es2015 compliant browsers https://caniuse.com/#feat=es6
2+
# just use one as representative for all
3+
4+
supports es6-module

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"serve:prerender": "cd dist/demo/browser && http-server",
1313
"compile:server": "tsc -p ./projects/demo/tsconfig.ssr.json",
1414
"generate:prerender": "node dist/demo/ssr/prerender",
15-
"test": "ng test --code-coverage=true",
15+
"test": "ng test",
1616
"preadd": "npm run build:schematics",
1717
"add": "schematics ./schematics/collection.json:library-starter --debug=false",
1818
"postadd": "git add ./projects",

projects/demo/angular.json

-55
This file was deleted.

projects/demo/tsconfig.app.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/app"
5+
},
6+
"files": ["./src/main.browser.ts", "./src/polyfills.ts"]
7+
}

projects/demo/tsconfig.demo.json

-8
This file was deleted.

0 commit comments

Comments
 (0)