Compare commits
2 Commits
f26b2b044f
...
182342aab0
| Author | SHA1 | Date | |
|---|---|---|---|
| 182342aab0 | |||
| d32758b310 |
@@ -29,16 +29,6 @@ jobs:
|
|||||||
integration:
|
integration:
|
||||||
name: "Integration tests"
|
name: "Integration tests"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
|
||||||
postgres:
|
|
||||||
image: postgres:16
|
|
||||||
env:
|
|
||||||
POSTGRES_DB: polympr_test
|
|
||||||
POSTGRES_USER: test
|
|
||||||
POSTGRES_PASSWORD: test
|
|
||||||
ports:
|
|
||||||
- 5432:5432
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -50,16 +40,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
deno-version: v2.x
|
deno-version: v2.x
|
||||||
|
|
||||||
|
- name: Start postgres
|
||||||
|
run: |
|
||||||
|
sudo apt-get update -qq && sudo apt-get install -y -qq postgresql > /dev/null
|
||||||
|
sudo systemctl start postgresql
|
||||||
|
sudo -u postgres psql -c "CREATE USER test WITH PASSWORD 'test';"
|
||||||
|
sudo -u postgres psql -c "CREATE DATABASE polympr_test OWNER test;"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install --ignore-scripts && deno install
|
run: npm install --ignore-scripts && deno install
|
||||||
|
|
||||||
- name: Wait for postgres
|
|
||||||
run: |
|
|
||||||
until bash -c 'echo > /dev/tcp/localhost/5432' 2>/dev/null; do
|
|
||||||
echo "Waiting for postgres..."
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: Apply migrations
|
- name: Apply migrations
|
||||||
env:
|
env:
|
||||||
POSTGRES_HOST: localhost
|
POSTGRES_HOST: localhost
|
||||||
|
|||||||
Reference in New Issue
Block a user