-
Notifications
You must be signed in to change notification settings - Fork 182
67 lines (54 loc) · 1.57 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- master
paths-ignore:
- '**/*.md'
- .github/workflows/**
pull_request:
branches:
- master
jobs:
build-and-test:
runs-on: ubuntu-latest
if: github.repository_owner == 'fabric8-analytics'
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://npm.pkg.github.com'
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create .npmrc
run: |
echo "@RHEcosystemAppEng:registry=https://npm.pkg.github.com" > ~/.npmrc
echo "@fabric8-analytics:registry=https://npm.pkg.github.com" >> ~/.npmrc
- name: Install @vscode/vsce
run: npm i -g @vscode/vsce
- name: Install Dependencies
run: npm ci
- name: Compile for test
run: npm run test-compile
- name: VSCE prepublish
run: vsce package
- name: Lint code
run: npm run lint
- name: Run headless test
uses: coactions/setup-xvfb@v1
with:
run: npm test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: Extension Build For PR ${{ github.event.pull_request.number }}
path: ./*.vsix