feat(gh actions): try gh actions
This commit is contained in:
247
.github/workflows/on-push-or-pull.yml
vendored
247
.github/workflows/on-push-or-pull.yml
vendored
@@ -1,189 +1,60 @@
|
|||||||
#name: on-pull-request-or-push
|
name: on-pull-request-or-push
|
||||||
#
|
|
||||||
#on:
|
on:
|
||||||
# pull_request:
|
pull_request:
|
||||||
# push:
|
push:
|
||||||
# branches:
|
branches:
|
||||||
# - development
|
- development
|
||||||
#
|
|
||||||
#env:
|
env:
|
||||||
# NX_BRANCH: ${{ github.event.number }}
|
NX_BRANCH: ${{ github.event.number }}
|
||||||
# NX_RUN_GROUP: ${{ github.run_id }}
|
NX_RUN_GROUP: ${{ github.run_id }}
|
||||||
# NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
|
# NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
|
||||||
# MOZ_HEALESS: 1
|
MOZ_HEALESS: 1
|
||||||
# SAUCE_USERNAME_PR: valorkinpr
|
SAUCE_USERNAME_PR: valorkinpr
|
||||||
## SAUCE_ACCESS_KEY_PR: e0a97bd3-4b74-4408-89bf-cce1b44a8bf1
|
# SAUCE_ACCESS_KEY_PR: e0a97bd3-4b74-4408-89bf-cce1b44a8bf1
|
||||||
## FIREBASE_CHANNEL: ${{ fromJSON('["", "live"]')[!github.base_ref] }}
|
# FIREBASE_CHANNEL: ${{ fromJSON('["", "live"]')[!github.base_ref] }}
|
||||||
#
|
|
||||||
# CACHE_NODE_MODULES_PATH: |
|
CACHE_NODE_MODULES_PATH: |
|
||||||
# ~/.npm
|
~/.npm
|
||||||
# node_modules
|
node_modules
|
||||||
#
|
|
||||||
# CACHE_DIST_PATH: |
|
CACHE_DIST_PATH: |
|
||||||
# dist
|
dist
|
||||||
#
|
|
||||||
#jobs:
|
jobs:
|
||||||
# # one run
|
# one run
|
||||||
# one_run:
|
one_run:
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# steps:
|
steps:
|
||||||
# - name: Cancel Previous Runs
|
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
|
||||||
# uses: styfle/cancel-workflow-action@0.9.0
|
|
||||||
# with:
|
# install dependencies
|
||||||
# access_token: ${{ secrets.GITHUB_TOKEN }}
|
install:
|
||||||
#
|
runs-on: ubuntu-latest
|
||||||
# # install dependencies
|
needs: one_run
|
||||||
# install:
|
steps:
|
||||||
# runs-on: ubuntu-latest
|
- uses: actions/checkout@v2
|
||||||
# needs: one_run
|
- uses: actions/cache@v2
|
||||||
# steps:
|
id: cache
|
||||||
# - uses: actions/checkout@v2
|
with:
|
||||||
# - uses: actions/cache@v2
|
path: ${{ env.CACHE_NODE_MODULES_PATH }}
|
||||||
# id: cache
|
key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||||
# with:
|
- run: npm ci
|
||||||
# path: ${{ env.CACHE_NODE_MODULES_PATH }}
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
# key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
# - run: npm ci
|
# build ngx-bootstrap
|
||||||
# if: steps.cache.outputs.cache-hit != 'true'
|
build:
|
||||||
#
|
needs: install
|
||||||
# # build ngx-bootstrap
|
runs-on: ubuntu-latest
|
||||||
# build:
|
steps:
|
||||||
# needs: install
|
- uses: actions/checkout@v2
|
||||||
# runs-on: ubuntu-latest
|
- uses: actions/cache@v2
|
||||||
# steps:
|
with:
|
||||||
# - uses: actions/checkout@v2
|
path: ${{ env.CACHE_NODE_MODULES_PATH }}
|
||||||
# - uses: actions/cache@v2
|
key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
||||||
# with:
|
- uses: actions/cache@v2
|
||||||
# path: ${{ env.CACHE_NODE_MODULES_PATH }}
|
with:
|
||||||
# key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
path: ${{ env.CACHE_DIST_PATH }}
|
||||||
# - uses: actions/cache@v2
|
key: dist-${{ github.run_id }}
|
||||||
# with:
|
- run: npx ng build --runner cloud --prod --with-deps
|
||||||
# path: ${{ env.CACHE_DIST_PATH }}
|
|
||||||
# key: dist-${{ github.run_id }}
|
|
||||||
# - run: npx ng build --runner cloud --prod --with-deps
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# # run unit tests
|
|
||||||
# unit_tests_with_coverage:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# needs: build
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
# - uses: actions/cache@v2
|
|
||||||
# with:
|
|
||||||
# path: ${{ env.CACHE_NODE_MODULES_PATH }}
|
|
||||||
# key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
# - uses: actions/cache@v2
|
|
||||||
# with:
|
|
||||||
# path: ${{ env.CACHE_DIST_PATH }}
|
|
||||||
# key: dist-${{ github.run_id }}
|
|
||||||
# - run: npm test -- --runner cloud --codeCoverage
|
|
||||||
# - run: npx codecov ./coverage/
|
|
||||||
# continue-on-error: true
|
|
||||||
#
|
|
||||||
# # run linting
|
|
||||||
# linting:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# needs: install
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
# - uses: actions/cache@v2
|
|
||||||
# with:
|
|
||||||
# path: ${{ env.CACHE_NODE_MODULES_PATH }}
|
|
||||||
# key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
# - run: npm run lint -- --runner cloud
|
|
||||||
#
|
|
||||||
# # firebase deploy preview
|
|
||||||
# firebase_preview:
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# needs: build
|
|
||||||
# outputs:
|
|
||||||
# output_url: ${{ steps.firebase_hosting_preview.outputs.details_url }}
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
# - uses: actions/cache@v2
|
|
||||||
# with:
|
|
||||||
# path: ${{ env.CACHE_DIST_PATH }}
|
|
||||||
# key: dist-${{ github.run_id }}
|
|
||||||
# - uses: FirebaseExtended/action-hosting-deploy@v0
|
|
||||||
# continue-on-error: true
|
|
||||||
# id: firebase_hosting_preview
|
|
||||||
# with:
|
|
||||||
# repoToken: '${{ secrets.GITHUB_TOKEN }}'
|
|
||||||
# firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_NGX_BOOTSTRAP_DEMO }}'
|
|
||||||
# projectId: ngx-bootstrap-demo
|
|
||||||
# channelId: ${{ env.FIREBASE_CHANNEL }}
|
|
||||||
# expires: 7d
|
|
||||||
#
|
|
||||||
# # run cypress
|
|
||||||
# e2e_smoke:
|
|
||||||
# name: e2e smoke
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# needs: [install, build, firebase_preview]
|
|
||||||
#
|
|
||||||
# strategy:
|
|
||||||
# # when one test fails, DO NOT cancel the other
|
|
||||||
# # containers, because this will kill Cypress processes
|
|
||||||
# # leaving the Dashboard hanging ...
|
|
||||||
# # https://github.com/cypress-io/github-action/issues/48
|
|
||||||
# fail-fast: false
|
|
||||||
# matrix:
|
|
||||||
# # run 3 copies of the current job in parallel
|
|
||||||
# containers: [1, 2, 3, 4, 5]
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
# - uses: actions/cache@v2
|
|
||||||
# with:
|
|
||||||
# path: ${{ env.CACHE_NODE_MODULES_PATH }}
|
|
||||||
# key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
# - uses: actions/cache@v2
|
|
||||||
# with:
|
|
||||||
# path: ${{ env.CACHE_DIST_PATH }}
|
|
||||||
# key: dist-${{ github.run_id }}
|
|
||||||
#
|
|
||||||
# # because of "record" and "parallel" parameters
|
|
||||||
# # these containers will load balance all found tests among themselves
|
|
||||||
# - name: smoke e2e on firebase
|
|
||||||
# if: ${{ needs.firebase_preview.outputs.output_url }}
|
|
||||||
# run: npx nx run ngx-bootstrap-docs-e2e:e2e -c firebase --runner cloud --record --group smoke --baseUrl=${{ needs.firebase_preview.outputs.output_url }}/ngx-bootstrap/ -- --parallel
|
|
||||||
#
|
|
||||||
# - name: smoke e2e local
|
|
||||||
# if: ${{ !needs.firebase_preview.outputs.output_url }}
|
|
||||||
# run: npx nx run ngx-bootstrap-docs-e2e:e2e --prod --runner cloud --record --group smoke -- --parallel
|
|
||||||
#
|
|
||||||
# e2e_full:
|
|
||||||
# name: e2e full
|
|
||||||
# runs-on: ubuntu-latest
|
|
||||||
# needs: [e2e_smoke]
|
|
||||||
#
|
|
||||||
# strategy:
|
|
||||||
# # when one test fails, DO NOT cancel the other
|
|
||||||
# # containers, because this will kill Cypress processes
|
|
||||||
# # leaving the Dashboard hanging ...
|
|
||||||
# # https://github.com/cypress-io/github-action/issues/48
|
|
||||||
# fail-fast: false
|
|
||||||
# matrix:
|
|
||||||
# # run 3 copies of the current job in parallel
|
|
||||||
# containers: [1, 2, 3, 4, 5]
|
|
||||||
# steps:
|
|
||||||
# - uses: actions/checkout@v2
|
|
||||||
# - uses: actions/cache@v2
|
|
||||||
# with:
|
|
||||||
# path: ${{ env.CACHE_NODE_MODULES_PATH }}
|
|
||||||
# key: node_modules-${{ hashFiles('**/package-lock.json') }}
|
|
||||||
# - uses: actions/cache@v2
|
|
||||||
# with:
|
|
||||||
# path: ${{ env.CACHE_DIST_PATH }}
|
|
||||||
# key: dist-${{ github.run_id }}
|
|
||||||
#
|
|
||||||
# # because of "record" and "parallel" parameters
|
|
||||||
# # these containers will load balance all found tests among themselves
|
|
||||||
# - name: full e2e on firebase
|
|
||||||
# if: ${{ needs.firebase_preview.outputs.output_url }}
|
|
||||||
# continue-on-error: true
|
|
||||||
# run: npx nx run ngx-bootstrap-docs-e2e:e2e -c firebase --runner cloud --cypressConfig ./apps/ngx-bootstrap-docs-e2e/cypress-full.json --record --group full --baseUrl=${{ needs.firebase_preview.outputs.output_url }}/ngx-bootstrap/ -- --parallel
|
|
||||||
#
|
|
||||||
# - name: full e2e on local
|
|
||||||
# if: ${{ !needs.firebase_preview.outputs.output_url }}
|
|
||||||
# continue-on-error: true
|
|
||||||
# run: npx nx run ngx-bootstrap-docs-e2e:e2e --prod --runner cloud --cypressConfig ./apps/ngx-bootstrap-docs-e2e/cypress-full.json --record --group full -- --parallel
|
|
||||||
|
|||||||
@@ -18,34 +18,3 @@
|
|||||||
],
|
],
|
||||||
"exclude": ["**/*.spec.ts"]
|
"exclude": ["**/*.spec.ts"]
|
||||||
}
|
}
|
||||||
|
|
||||||
//{
|
|
||||||
// "compilerOptions": {
|
|
||||||
// "baseUrl": ".",
|
|
||||||
// "declaration": false,
|
|
||||||
// "downlevelIteration": true,
|
|
||||||
// "emitDecoratorMetadata": true,
|
|
||||||
// "experimentalDecorators": true,
|
|
||||||
// "noEmitHelpers": false,
|
|
||||||
// "lib": ["es6", "dom"],
|
|
||||||
// "mapRoot": "./",
|
|
||||||
// "module": "esnext",
|
|
||||||
// "moduleResolution": "node",
|
|
||||||
// "outDir": "../temp/out-tsc",
|
|
||||||
// "sourceMap": true,
|
|
||||||
// "target": "es2015"
|
|
||||||
// },
|
|
||||||
// "files": [
|
|
||||||
// "../../scripts/typings.d.ts",
|
|
||||||
// "main.ts",
|
|
||||||
// "../../scripts/polyfills.ts"
|
|
||||||
// ],
|
|
||||||
// "exclude": [
|
|
||||||
// "**/*.spec.ts"
|
|
||||||
// ],
|
|
||||||
// "paths": {
|
|
||||||
// "@ng2-file-upload": [
|
|
||||||
// "../../dist/ng2-file-upload/index.ts"
|
|
||||||
// ]
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user