-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.17 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Copyright (c) 2023-present VPMedia
# author: Andras Csizmadia <andras@vpmedia.hu>
name: Continuous Integration
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Init
run: npm ci --no-audit --no-fund
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Slack notification
# https://github.com/slackapi/slack-github-action
id: slack
uses: slackapi/slack-github-action@v1.26.0
with:
channel-id: "dev-github"
slack-message: "${{ github.repository }} - ${{ github.workflow }} workflow is ${{ job.status }} for ${{ github.base_ref || github.ref_name }} branch\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
if: always()