-
-
Notifications
You must be signed in to change notification settings - Fork 7
88 lines (84 loc) · 2.5 KB
/
workflow.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Main workflow
on: [push]
jobs:
check:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup
uses: ./.github/actions/setup
- name: Lint
run: yarn lint
- name: TypeCheck
run: yarn typecheck
unit-test:
name: Unit Tests
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup
uses: ./.github/actions/setup
- name: Test
run: yarn test
- name: Build
run: yarn build
build:
name: Build
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup
uses: ./.github/actions/setup
- name: Build
run: yarn build
- name: Upload Artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: lib
path: lib
integration-test:
name: Integration Tests
runs-on: ${{ matrix.os }}
needs:
- build
- unit-test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup
uses: ./.github/actions/setup
- name: Download Artifact
uses: actions/download-artifact@9c19ed7fe5d278cd354c7dfd5d3b88589c7e2395 # v4.1.6
- name: Run Integration Tests
uses: ./
- name: Graphviz test
run: dot -V
versioning:
name: Versioning
runs-on: ubuntu-latest
needs:
- integration-test
permissions:
contents: write # Used to commit to "Version Packages" PR
pull-requests: write # Used to create "Version Packages" PR
if: ${{ github.event_name == 'push' && github.repository == 'ts-graphviz/setup-graphviz' && github.ref == 'refs/heads/main' && success() }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup
uses: ./.github/actions/setup
- name: Create Release Pull Request
id: changesets
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}