Repository navigation
53 lines (47 loc) · 1.67 KB
/
Copy pathtest.yml
File metadata and controls
53 lines (47 loc) · 1.67 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
name: Run Tests
on:
# No branch filter: a stacked PR based on another feature branch must still run
# tests. With a filter, such PRs report no checks at all — and a required status
# check that never reports counts as pending, blocking the merge forever.
pull_request:
env:
NODE_VERSION: 24
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run lint
- run: pnpm run build
- run: pnpm test
# Started as a step, not a service: `services:` cannot pass a command, and the
# minio image needs `server /data`. Without this the integration spec skips, and
# skip-by-default plus never-in-CI means it rots — which matters because mocked
# tests cannot catch an SDK behaviour change.
- name: Start MinIO
run: |
docker run -d --name ci-minio -p 9000:9000 \
-e MINIO_ROOT_USER=minioadmin \
-e MINIO_ROOT_PASSWORD=minioadmin \
minio/minio:latest server /data
for i in $(seq 1 30); do
if curl -sf http://127.0.0.1:9000/minio/health/live; then
echo "minio ready"; exit 0
fi
sleep 2
done
echo "minio did not become healthy" >&2
docker logs ci-minio >&2
exit 1
- run: pnpm run test:integration
env:
MINIO_TEST_ENDPOINT: http://127.0.0.1:9000
- name: Stop MinIO
if: always()
run: docker rm -f ci-minio || true