-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (56 loc) · 1.63 KB
/
pr.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
name: PR
on:
pull_request:
jobs:
pr:
timeout-minutes: 60
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup variables
id: setup
run: |
cat package.json | grep "version" | sed 's/ "version": "\([^"]*\)",/\1/' >> .tmp-version
echo "VERSION=$(cat .tmp-version)" >> "$GITHUB_OUTPUT"
cat .tmp-version
rm .tmp-version
- name: Install dependencies
run: npm ci
- name: Code style
run: |
npm run lint
npm run prettier
- name: Unit Tests
run: npm test
# TODO: setup Playwright tests or remove this
# - name: Install Playwright Browsers
# run: npx playwright install --with-deps
# - name: Run Playwright tests
# run: npm run e2e
# - name: Keep test report
# uses: actions/upload-artifact@v4
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30
- name: Create release
if: always()
env:
VERSION: ${{ steps.setup.outputs.VERSION }}
run: |
npm run build
npm pack
- name: Keep release archive
uses: actions/upload-artifact@v4
if: always()
env:
VERSION: ${{ steps.setup.outputs.VERSION }}
with:
name: talk-control-revealjs-extensions-${{env.VERSION}}
path: talk-control-revealjs-extensions-${{env.VERSION}}.tgz
retention-days: 30