forked from latticexyz/mud
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.87 KB
/
test.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
name: Tests
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Run tests
runs-on: depot-ubuntu-22.04-16
services:
postgres:
image: postgres:12.1-alpine
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
local-kms:
image: nsmithuk/local-kms
ports:
- 8080:8080
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Check for changes outside docs
id: check_changes
run: ./.github/scripts/check_changes_outside_docs.sh
- name: Setup
if: steps.check_changes.outputs.changes_outside_docs
uses: ./.github/actions/setup
- name: Build
if: steps.check_changes.outputs.changes_outside_docs
uses: ./.github/actions/build
- name: Run tests
if: steps.check_changes.outputs.changes_outside_docs
timeout-minutes: 15
env:
DATABASE_URL: "postgres://postgres@localhost:5432/postgres"
AWS_ENDPOINT_URL: "http://localhost:8080"
run: pnpm test:ci
- name: Generate gas reports
if: steps.check_changes.outputs.changes_outside_docs
run: pnpm gas-report
- name: Outdated files, run `pnpm gas-report` and commit them
if: steps.check_changes.outputs.changes_outside_docs
uses: ./.github/actions/require-empty-diff
- name: Sort package.json
if: steps.check_changes.outputs.changes_outside_docs
run: pnpm sort-package-json
- name: Outdated files, run `sort-package-json` and commit them
if: steps.check_changes.outputs.changes_outside_docs
uses: ./.github/actions/require-empty-diff