Skip to content

Feat/1 initial setup #1

Feat/1 initial setup

Feat/1 initial setup #1

# 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