-
-
Notifications
You must be signed in to change notification settings - Fork 6
84 lines (74 loc) · 2.27 KB
/
test-and-run.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
name: "test"
on:
push:
pull_request:
merge_group:
workflow_dispatch:
jobs:
test-unit:
runs-on: ubuntu-latest
permissions:
packages: read
contents: read
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: test
uses: devcontainers/ci@a56d055efecd725e8cfe370543b6071b79989cc8
with:
imageName: ghcr.io/${{ github.repository }}/devcontainer
cacheFrom: ghcr.io/${{ github.repository }}/devcontainer
push: never
runCmd: |
npm ci
npm test
test-run:
runs-on: ubuntu-latest
permissions:
packages: read
contents: read
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b
- uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: build
uses: devcontainers/ci@a56d055efecd725e8cfe370543b6071b79989cc8
with:
imageName: ghcr.io/${{ github.repository }}/devcontainer
cacheFrom: ghcr.io/${{ github.repository }}/devcontainer
push: never
runCmd: |
npm ci
npm run build
- name: test run
uses: ./
with:
url: "https://raw.githubusercontent.com/${{ github.repository }}/${{ github.sha }}/tests/fixture/feed.xml"
file: "tests/fixture/input.md"
- name: check diff
run: diff tests/fixture/input.md tests/fixture/wants.md
conclude:
runs-on: ubuntu-latest
needs:
- test-unit
- test-run
if: always()
permissions:
actions: read
steps:
- uses: sarisia/actions/conclusion@main
id: ghapi
- name: report result
uses: sarisia/actions-status-discord@6712a17f7d0531d44cd42ca2a878b0bdfd07b62a
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ steps.ghapi.outputs.conclusion }}
title: ${{ github.workflow }} - conclusion