mirror of
https://github.com/xbgmsharp/postgsail.git
synced 2025-09-17 03:07:47 +00:00
Update github workflows
This commit is contained in:
6
.github/workflows/db-test.yml
vendored
6
.github/workflows/db-test.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: PostgSail DB Tests docker & sql schema
|
||||
name: Test services db and api
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -21,8 +21,8 @@ jobs:
|
||||
- name: Check out the source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Pull Docker image
|
||||
run: docker pull xbgmsharp/timescaledb-postgis
|
||||
- name: Pull Docker images
|
||||
run: docker-compose pull db api
|
||||
|
||||
- name: Install psql
|
||||
run: sudo apt install postgresql-client
|
||||
|
52
.github/workflows/frontend-test.yml
vendored
Normal file
52
.github/workflows/frontend-test.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
name: Test services db api web
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'frontend/**'
|
||||
branches:
|
||||
- 'main'
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
paths:
|
||||
- 'frontend/**'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
ci-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Pull Docker images
|
||||
run: docker-compose pull db api web
|
||||
|
||||
- name: Set env
|
||||
run: cp .env.example .env
|
||||
|
||||
- name: Run PostgSail Grafana test
|
||||
# Environment variables
|
||||
env:
|
||||
# The hostname used to communicate with the PostgreSQL service container
|
||||
PGHOST: localhost
|
||||
PGPORT: 5432
|
||||
PGDATABASE: signalk
|
||||
PGUSER: username
|
||||
PGPASSWORD: password
|
||||
run: |
|
||||
set -eu
|
||||
source .env
|
||||
docker-compose stop || true
|
||||
docker-compose rm || true
|
||||
docker-compose up -d db && sleep 15 && docker-compose up -d api && sleep 5
|
||||
docker-compose ps -a
|
||||
echo "Test PostgSail Web Unit Test"
|
||||
docker-compose -d up web && sleep 5
|
||||
docker-compose ps -a
|
||||
curl http://localhost:8080/
|
||||
- name: Show the logs
|
||||
if: always()
|
||||
run: |
|
||||
docker-compose logs
|
21
.github/workflows/grafana-test.yml
vendored
21
.github/workflows/grafana-test.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Test grafana commit && PR
|
||||
name: Test services db and grafana
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@@ -19,22 +19,9 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
-
|
||||
name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2
|
||||
# https://github.com/marketplace/actions/build-and-push-docker-images
|
||||
-
|
||||
name: Build and push
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: false
|
||||
tags: xbgmsharp/timescaledb-postgis:latest
|
||||
|
||||
- name: Pull Docker images
|
||||
run: docker-compose pull db app
|
||||
|
||||
- name: Set env
|
||||
run: cp .env.example .env
|
||||
|
Reference in New Issue
Block a user