-
Notifications
You must be signed in to change notification settings - Fork 5
70 lines (65 loc) · 2.25 KB
/
node.js.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
node-version: [18.14.2]
steps:
- uses: actions/checkout@v4
- name: Setup unit test environment
run: sudo apt-get install librsvg2-bin imagemagick exiftool
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Log used OS
run: uname -a
- name: Run directory
run: pwd
- name: Install aio CLI
run: npm install -g @adobe/[email protected]
- name: Log aio details
run: aio info
- name: Docker login
run: docker login -u $REGISTRY_ID -p $REGISTRY_SECRET adobeassetcompute.azurecr.io
env:
REGISTRY_ID: ${{ secrets.AZURE_CONTAINER_REGISTRY_ID }}
REGISTRY_SECRET: ${{ secrets.AZURE_CONTAINER_REGISTRY_SECRET }}
- name: Install dependencies (all)
run: npm install
- name: Run unit tests
run: npm test
- name: Report coverage
run: npm run report-coverage
sizewatcher:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
steps:
- uses: actions/checkout@v4
- run: npx @adobe/sizewatcher
semantic-release:
runs-on: ubuntu-latest
needs: [build]
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') && github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js 12.19 for semantic release
uses: actions/setup-node@v1
with:
node-version: "14.17"
- run: npm install
- run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.ADOBE_BOT_GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}