Skip to content

Commit 4e5081b

Browse files
committed
fix: CI
1 parent 117c06a commit 4e5081b

File tree

5 files changed

+20
-41
lines changed

5 files changed

+20
-41
lines changed

.Dockerignore

-2
This file was deleted.

.github/workflows/ci.yml

+7-22
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,20 @@ on:
99

1010
jobs:
1111
test:
12-
name: Test / OS ${{ matrix.platform }} / Node ${{ matrix.node }}
13-
strategy:
14-
fail-fast: false
15-
matrix:
16-
platform: [ubuntu-latest]
17-
node: ['14']
18-
19-
runs-on: ${{ matrix.platform }}
20-
12+
name: Test
13+
runs-on: ubuntu-20.04
2114
steps:
2215
- uses: actions/checkout@v2
2316

24-
- name: Set up DB
25-
run: docker-compose up -d
26-
27-
- uses: actions/cache@v1
28-
with:
29-
path: ~/.npm
30-
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
31-
restore-keys: |
32-
${{ runner.os }}-node-
33-
3417
- name: Set up Node
3518
uses: actions/setup-node@v2
3619
with:
37-
node-version: ${{ matrix.node }}
20+
node-version: "14"
3821

3922
- run: |
40-
npm ci
23+
docker-compose up --detach
24+
export PG_META_PORT=8000
25+
npm clean-install
4126
npm run dev &
42-
sleep 30
27+
npx wait-for-localhost-cli --use-get $PG_META_PORT
4328
npm test

.github/workflows/docs.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,17 @@ on:
88

99
jobs:
1010
docs:
11-
name: Publish docs / OS ${{ matrix.os }} / Node ${{ matrix.node }}
12-
strategy:
13-
matrix:
14-
os:
15-
- ubuntu-latest
16-
node:
17-
- '14'
18-
19-
runs-on: ${{ matrix.os }}
20-
11+
name: Publish docs
12+
runs-on: ubuntu-20.04
2113
steps:
2214
- uses: actions/checkout@v2
2315

2416
- uses: actions/setup-node@v2
2517
with:
26-
node-version: ${{ matrix.node }}
18+
node-version: "14"
2719

2820
- run: |
29-
npm ci
21+
npm clean-install
3022
npm run docs:export
3123
3224
- name: Generate Swagger UI

.github/workflows/release.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,12 @@ jobs:
4949
run: |
5050
npm clean-install
5151
npm run pkg
52-
tar -czvf postgres-meta-${{ needs.semantic-release.outputs.new-release-version }}-x86_64-linux-gnu.tar.gz -C ./bin postgres-meta-linux
53-
tar -czvf postgres-meta-${{ needs.semantic-release.outputs.new-release-version }}-x86_64-apple-darwin.tar.gz -C ./bin postgres-meta-macos
54-
tar -czvf postgres-meta-${{ needs.semantic-release.outputs.new-release-version }}-x86_64-pc-windows.tar.gz -C ./bin postgres-meta-win.exe
52+
mv bin/postgres-meta-linux postgres-meta
53+
tar -czvf postgres-meta-${{ needs.semantic-release.outputs.new-release-version }}-x86_64-linux-gnu.tar.gz postgres-meta
54+
mv bin/postgres-meta-macos postgres-meta
55+
tar -czvf postgres-meta-${{ needs.semantic-release.outputs.new-release-version }}-x86_64-apple-darwin.tar.gz postgres-meta
56+
mv bin/postgres-meta-win.exe postgres-meta.exe
57+
tar -czvf postgres-meta-${{ needs.semantic-release.outputs.new-release-version }}-x86_64-pc-windows.tar.gz postgres-meta.exe
5558
5659
- uses: softprops/action-gh-release@v1
5760
with:
@@ -89,6 +92,7 @@ jobs:
8992

9093
- uses: docker/build-push-action@v2
9194
with:
95+
context: .
9296
push: true
9397
tags: supabase/postgres-meta:latest,supabase/postgres-meta:v${{ needs.semantic-release.outputs.new-release-version }}
9498
platforms: linux/amd64,linux/arm64

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# docker run -t -i -p8080:8080 postgres-meta
33

44
FROM debian:stable-slim
5-
COPY ./bin/postgres-meta-linux .
5+
COPY bin/postgres-meta-linux .
66
ENV PG_META_PORT=8080
7-
ENTRYPOINT "./postgres-meta-linux"
7+
ENTRYPOINT ["postgres-meta-linux"]
88
EXPOSE 8080

0 commit comments

Comments
 (0)