dev/actions #26
@@ -4,7 +4,7 @@ on: [push]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
testing:
|
testing:
|
||||||
name: check and test
|
name: Run Go Tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
@@ -22,8 +22,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0 # all history for all branches and tags
|
|
||||||
|
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
@@ -44,18 +42,18 @@ jobs:
|
|||||||
/go_path
|
/go_path
|
||||||
/go_cache
|
/go_cache
|
||||||
key: go_path-${{ steps.hash-go.outputs.hash }}
|
key: go_path-${{ steps.hash-go.outputs.hash }}
|
||||||
# - name: Setup test database
|
|
||||||
# run: |
|
|
||||||
# docker run -d --rm --name postgres_build_db \
|
|
||||||
# -p $POSTGRES_PORT:5432 \
|
|
||||||
# -e POSTGRES_USER=$POSTGRES_USER \
|
|
||||||
# -e POSTGRES_PASSWORD=$POSTGRES_PASSWORD \
|
|
||||||
# -e POSTGRES_DB=$POSTGRES_DB \
|
|
||||||
# postgres:16
|
|
||||||
# while [[ $(docker logs postgres_build_db 2>&1 | grep -c "database system is ready to accept connections") == 0 ]]; do
|
|
||||||
# sleep 1;
|
|
||||||
# done;
|
|
||||||
- name: Run Go Tests
|
- name: Run Go Tests
|
||||||
run: cd Backend && go test ./...
|
run: cd Backend && go test ./...
|
||||||
# - name: Shutdown Postgres DB
|
build:
|
||||||
# run: docker stop postgres_build_db
|
needs: testing
|
||||||
|
name: Build Go Image and Upload
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.letsstein.de
|
||||||
|
username: ${{ gitea.actor }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user