Feat/1 initial setup #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run the linter on the relevant version of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Angular Github CI | |
on: | |
push: | |
branches: [ master, main ] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x] | |
steps: | |
- run: echo "π The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "π§ This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "π The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v2 | |
- run: echo "π‘ The ${{ github.repository }} repository has been cloned to the runner." | |
- run: echo "π₯οΈ The workflow is now ready to test your code on the runner." | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- run: npm ci | |
- run: npm run build | |
- name: List files in distribution directory | |
run: | | |
ls -R ./dist | |
- run: npm run lint | |
- run: echo "π This job's status is ${{ job.status }}." | |
- name: Send Slack notification on success | |
if: ${{ success() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_CHANNEL: bots-compass-goals-walkthrough | |
SLACK_USERNAME: Github Actions | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: ":white_check_mark: ${{ github.event_name }} ${{ job.status }} on ${{ github.ref_name }}" | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
MSG_MINIMAL: commit,actions url | |
- name: Send Slack notification on failure | |
if: ${{ failure() }} | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_CHANNEL: bots-compass-goals-walkthrough | |
SLACK_USERNAME: Github Actions | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: ":x: ${{ github.event_name }} ${{ job.status }} on ${{ github.ref_name }}" | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
MSG_MINIMAL: commit,actions url |