File tree 5 files changed +608
-508
lines changed
implementations/lighthouse
5 files changed +608
-508
lines changed Original file line number Diff line number Diff line change @@ -65,11 +65,10 @@ jobs:
65
65
workspace :
66
66
- deno
67
67
- hotchocolate
68
+ - lighthouse
68
69
- postgraphile
69
70
# TODO: speed up build process
70
71
# - pioneer
71
- # TODO: ensure consistant results
72
- # - lighthouse
73
72
env :
74
73
PORT : 4000
75
74
steps :
Original file line number Diff line number Diff line change @@ -23,22 +23,36 @@ Every implementation is expected to contain a `package.json` file with at least
23
23
"name" : " implementation-name" , // should be equivalent to the directory name
24
24
"url" : " https://implementation-name.example" , // the official project URL
25
25
"scripts" : {
26
- "start" : " node ." | "docker- compose up -d " // depending if the server can be run through node or Docker
26
+ "start" : " node ." | "docker compose up" // depending if the server can be run through Node.js or Docker
27
27
}
28
28
}
29
29
```
30
30
31
31
Depending on how your server is run, add it to the appropriate section of [ .github/workflows/audits.yml] ( .github/workflows/audits.yml ) :
32
32
33
- - ` node . ` : ` jobs.javascript.strategy.matrix.workspace `
34
- - ` docker-compose up -d ` : ` jobs.docker.strategy.matrix.workspace `
33
+ - Node.js : ` jobs.javascript.strategy.matrix.workspace `
34
+ - Docker : ` jobs.docker.strategy.matrix.workspace `
35
35
36
36
The script run in ` start ` is expected to bring up an HTTP server that listens to the port defined in the environment variable ` $PORT ` .
37
37
38
38
After adding your directory and ` package.json ` , run ` yarn install ` to include the workspace.
39
39
40
+ You may run the audit on your implementation locally by first bringing up the server:
41
+
42
+ ``` shell
43
+ PORT=4000 yarn workspace < implementation> start
44
+ ```
45
+
46
+ Then open another shell or move the prior process to the background and run:
47
+
48
+ ``` shell
49
+ PORT=4000 yarn tsx scripts/audit-implementation.ts implementations/< implementation>
50
+ ```
51
+
40
52
## Code formatting
41
53
42
54
Run the following script to ensure the automatic code formatting is applied:
43
55
44
- yarn run lint:fix
56
+ ``` shell
57
+ yarn run lint:fix
58
+ ```
Original file line number Diff line number Diff line change 1
- FROM php:8.1.21-cli
2
-
3
- WORKDIR /app
1
+ # See https://hub.docker.com/_/php/tags?page=&page_size=&ordering=&name=cli.
2
+ FROM php:8.2.19-cli
4
3
4
+ # See https://getcomposer.org.
5
5
COPY --from=composer /usr/bin/composer /usr/bin/composer
6
6
7
- RUN apt-get update && \
8
- apt-get install --yes \
7
+ # Required to make the composer installations work.
8
+ RUN apt-get update \
9
+ && apt-get install --yes \
9
10
git \
10
11
libzip-dev \
11
12
zip \
12
13
&& docker-php-ext-install \
13
14
zip \
14
15
&& rm -rf /var/lib/apt/lists/*
15
- RUN composer create-project laravel/laravel /app
16
- RUN composer require nuwave/lighthouse 6.14.0
16
+
17
+ # Creating a project following https://laravel.com/docs/installation#creating-a-laravel-project.
18
+ # See https://github.com/laravel/laravel/releases for new versions.
19
+ WORKDIR /app
20
+ RUN composer create-project laravel/laravel=11.1.1 /app
21
+
22
+ # See https://github.com/nuwave/lighthouse/releases for new versions.
23
+ RUN composer require nuwave/lighthouse:6.36.3
24
+
25
+ # Following https://lighthouse-php.com/6/getting-started/installation.html#publish-the-default-schema.
17
26
RUN php artisan vendor:publish --tag=lighthouse-schema
You can’t perform that action at this time.
0 commit comments