-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (55 loc) · 1.54 KB
/
XrmEx.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
name: XrmEx
on:
push:
pull_request:
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
Test:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.42.1-jammy
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Dependencies audit
run: npm audit --audit-level=moderate
- name: Build
run: npm run build
- name: Format check
run: npm run format:check
- name: Lint check
run: npm run lint:check
- name: Run Playwright tests
run: |
if [ "${{ github.repository }}" == "AhashSritharan/Xrm-Ex" ]; then
npx playwright test
else
npx playwright test contact.spec.ts
fi
env:
ENV_VAR_JSON: ${{ secrets.ENV_VAR_JSON }}
- name: Upload Playwright Report
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: playwright-report/
retention-days: 30
Release:
needs: Test
runs-on: ubuntu-latest
if: github.repository == 'AhashSritharan/Xrm-Ex' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: volta-cli/action@v3
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Release
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}