-
-
Notifications
You must be signed in to change notification settings - Fork 3
99 lines (85 loc) · 2.29 KB
/
Copy pathtests.yml
File metadata and controls
99 lines (85 loc) · 2.29 KB
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
91
92
93
94
95
96
97
98
99
name: tests
on:
push:
branches: [main]
paths-ignore:
- '**.md'
- 'LICENSE'
- '.gitignore'
pull_request:
branches: ['**']
workflow_dispatch:
permissions:
contents: read
pull-requests: write
statuses: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
name: Lint & Typecheck
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
run: bun run lint
- name: Commitlint
if: github.event_name == 'pull_request'
run: bunx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Typecheck
run: bun run ts
tests:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
include:
- runtime: bun
version: latest
- runtime: node
version: lts/*
- runtime: node
version: latest
name: Test (${{ matrix.runtime }} ${{ matrix.version }})
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Setup Node.js
if: matrix.runtime == 'node'
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
- name: Install OS dependencies
run: |
sudo apt-get update
sudo apt-get -y install libkrb5-dev
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Start services
run: docker compose up -d --wait
- name: Run Tests
run: |
if [ "${{ matrix.runtime }}" = "node" ]; then
npm test
else
bun run test
fi
- name: Submit coverage
if: matrix.runtime == 'node' && matrix.version == 'lts/*'
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: ./coverage/lcov.info