Skip to content

Commit c99829e

Browse files
authored
ci: matrix workflows and bake docker with cache (#44)
1 parent 55a22d8 commit c99829e

File tree

11 files changed

+126
-330
lines changed

11 files changed

+126
-330
lines changed

.github/workflows/audits.yml

+70-320
Large diffs are not rendered by default.
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Reusable audit URL
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
workspace:
7+
required: true
8+
type: string
9+
url:
10+
required: true
11+
type: string
12+
13+
jobs:
14+
audit:
15+
runs-on: ubuntu-latest
16+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
- name: Set up node
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: 18
24+
cache: yarn
25+
- name: Install
26+
run: yarn install --immutable
27+
- name: Build
28+
run: yarn build:esm
29+
- name: Audit
30+
run: URL=${{ inputs.url }} node scripts/audit-implementation.mjs implementations/${{ inputs.workspace }}
31+
- name: Upload audit report
32+
uses: actions/upload-artifact@v3
33+
with:
34+
name: audit-reports
35+
# > If multiple paths are provided as input, the least common ancestor of all the search paths will be used as the root directory of the artifact.
36+
# https://github.com/actions/upload-artifact#upload-using-multiple-paths-and-exclusions
37+
#
38+
# Because of this, we include the root README.md to maintain the paths during artifact downloads
39+
path: |
40+
README.md
41+
implementations/${{ inputs.workspace }}/README.md
42+
implementations/${{ inputs.workspace }}/report.json

implementations/deno/docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
services:
2-
server:
2+
deno-server:
33
build: .
4+
image: deno-server
45
environment:
56
- PORT=${PORT}
67
ports:

implementations/deno/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"name": "deno",
44
"packageManager": "[email protected]",
55
"scripts": {
6-
"start": "docker compose up --build"
6+
"start": "docker compose up"
77
}
88
}

implementations/hotchocolate/docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
services:
2-
server:
2+
hotchocolate-server:
3+
image: hotchocolate-server
34
build: .
45
environment:
56
- DOTNET_URLS=http://+:${PORT}

implementations/hotchocolate/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"name": "hotchocolate",
44
"packageManager": "[email protected]",
55
"scripts": {
6-
"start": "docker compose up --build"
6+
"start": "docker compose up"
77
}
88
}

implementations/pioneer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ RUN apt install curl -y
55
COPY ./Package.* ./
66
RUN swift package resolve
77
COPY ./Sources ./Sources
8-
RUN swift build
8+
RUN swift build -c release

implementations/pioneer/docker-compose.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
services:
2-
server:
2+
pioneer-server:
3+
image: pioneer-server
34
build: .
45
environment:
56
- PORT=${PORT}
67
ports:
78
- ${PORT}:${PORT}
8-
entrypoint: swift run
9+
entrypoint: .build/release/audit
910
healthcheck:
1011
test: curl -f http://localhost:$$PORT/graphql?query=%7B__typename%7D || exit 1
1112
interval: 3s

implementations/pioneer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"name": "pioneer",
44
"packageManager": "[email protected]",
55
"scripts": {
6-
"start": "docker compose up --build"
6+
"start": "docker compose up"
77
}
88
}

implementations/postgraphile/docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ services:
77
test: pg_isready -U postgres || exit 1
88
interval: 3s
99
timeout: 1s
10-
server:
10+
postgraphile-server:
1111
build: .
12+
image: postgraphile-server
1213
depends_on:
1314
database:
1415
condition: service_healthy

implementations/postgraphile/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"name": "postgraphile",
44
"packageManager": "[email protected]",
55
"scripts": {
6-
"start": "docker compose up --build"
6+
"start": "docker compose up"
77
}
88
}

0 commit comments

Comments
 (0)