-
Notifications
You must be signed in to change notification settings - Fork 44
90 lines (71 loc) · 2.43 KB
/
checks-and-tests.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Run checks and tests
on: workflow_call
jobs:
validate-markdown:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Restore NPM Cache
uses: ./.github/actions/restore-npm-cache
- name: Validate markdown authors and posts
id: validate_markdown
run: CI=true npm run validate-markdown
- name: Add a comment to the PR after failed markdown validation
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request' && failure()
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.pull_request.number }}
header: validate-markdown
message: |
#### Markdown invalid 🖌
The markdown of the file **${{ steps.validate_markdown.outputs.filePath }}** is invalid !
> ${{ steps.validate_markdown.outputs.reason }}
- name: Remove a comment to the PR after success markdown validation
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request' && success()
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ github.event.pull_request.number }}
header: validate-markdown
delete: true
eslint:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Restore NPM Cache
uses: ./.github/actions/restore-npm-cache
- name: Lint code
run: npm run lint:es
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Restore NPM Cache
uses: ./.github/actions/restore-npm-cache
- name: Run Compile TypeScript
run: npx tsc
test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Restore NPM Cache
uses: ./.github/actions/restore-npm-cache
- name: Run Tests
run: npm run test
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Restore NPM Cache
uses: ./.github/actions/restore-npm-cache
- name: Build Application
run: WITH_DOWNLOAD_TRANSLATIONS_AND_GENERATE_IMAGE_FORMATS=false npm run build