Skip to content

Add TIL conf details #112

Add TIL conf details

Add TIL conf details #112

Workflow file for this run

name: This is Learning CI
env:
NODE_OPTIONS: --max-old-space-size=6144
NX_BRANCH: ${{ github.event.number }}
NX_MAX_PARALLEL: 2
NX_RUN_GROUP: ${{ github.run_id }}
node-version: 14.x
package-name: this-is-learning-package
on:
push:
branches:
- main
pull_request: {}
workflow_dispatch: {}
jobs:
lint:
name: Lint and check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node-version }}
- name: Variable-Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn cache directory
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-${{ env.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ env.node-version }}-
${{ runner.os }}-
- name: Install dependencies
run: yarn install
- run: yarn lint --max-parallel=$NX_MAX_PARALLEL
test:
name: Unit and integration test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node-version }}
- name: Variable-Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn cache directory
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-${{ env.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ env.node-version }}-
${{ runner.os }}-
- name: Install dependencies
run: yarn install
- name: Run Angular Compatibility Compiler
run: yarn ngcc
- run: yarn test --max-parallel=$NX_MAX_PARALLEL
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node-version }}
- name: Variable-Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn cache directory
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-${{ env.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ env.node-version }}-
${{ runner.os }}-
- name: Install dependencies
run: yarn install
- name: Run Angular Compatibility Compiler
run: yarn ngcc
- run: yarn build --max-parallel=$NX_MAX_PARALLEL
- run: yarn scully
- name: Upload static website package
uses: actions/upload-artifact@v2
with:
name: ${{ env.package-name }}
path: dist/static/this-is-learning
if-no-files-found: error
deploy:
name: Deploy
if: >
github.ref == 'refs/heads/main' &&
(github.event_name == 'workflow_dispatch' || github.event_name == 'push')
needs:
- build
- e2e
- test
runs-on: ubuntu-latest
env:
package-path: ./this-is-learning
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: ${{ env.package-name }}
path: ${{ env.package-path }}
- name: Disable Jekyll on GitHub Pages
run: touch ${{ env.package-path }}/.nojekyll
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: ${{ env.package-path }}
e2e:
name: End-to-end test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ env.node-version }}
- name: Variable-Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Yarn cache directory
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-node-${{ env.node-version }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ env.node-version }}-
${{ runner.os }}-
- name: Install dependencies
run: yarn install
- name: Run Angular Compatibility Compiler
run: yarn ngcc
- run: yarn e2e --configuration=ci --max-parallel=$NX_MAX_PARALLEL