chore: fix CI
This commit is contained in:
parent
fc690fbefe
commit
df4343c667
3 changed files with 21 additions and 18 deletions
|
@ -1,3 +1,3 @@
|
|||
export POSTGRES_DATABASE_URL="postgres://postgres:password@localhost:5432/postgres"
|
||||
export SQLITE_TMP="$(pwd)/database/db-sqlx-sqlite/tmp"
|
||||
export SQLITE_TMP="$(pwd)/db/db-sqlx-sqlite/tmp"
|
||||
export SQLITE_DATABASE_URL="sqlite://$SQLITE_TMP/admin.db"
|
||||
|
|
16
.github/workflows/coverage.yml
vendored
16
.github/workflows/coverage.yml
vendored
|
@ -53,17 +53,19 @@ jobs:
|
|||
|
||||
- name: load env
|
||||
run: |
|
||||
mkdir -p db/db-sqlx-sqlite/tmp &&
|
||||
source .env-sample \
|
||||
&& echo "POSTGRES_DATABASE_URL=$POSTGRES_DATABASE_URL" >> $GITHUB_ENV \
|
||||
&& echo "SQLITE_DATABASE_URL=$SQLITE_DATABASE_URL" >> $GITHUB_ENV
|
||||
|
||||
- name: launch gitea
|
||||
timeout-minutes: 10
|
||||
run: docker-compose -f docker-compose-dev-deps.yml up --detach
|
||||
|
||||
- name: Install and setup Gitea
|
||||
timeout-minutes: 10
|
||||
run: python ./scripts/gitea.py
|
||||
# usually run as part of `make test` but because this workflow doesn't run
|
||||
# that command, `make dev-env` is used
|
||||
- name: setup dev environment
|
||||
run: make dev-env
|
||||
env:
|
||||
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
|
||||
- name: run migrations
|
||||
run: make migrate
|
||||
|
|
21
.github/workflows/linux.yml
vendored
21
.github/workflows/linux.yml
vendored
|
@ -63,16 +63,24 @@ jobs:
|
|||
|
||||
- name: load env
|
||||
run: |
|
||||
mkdir -p db/db-sqlx-sqlite/tmp &&
|
||||
source .env-sample \
|
||||
&& echo "POSTGRES_DATABASE_URL=$POSTGRES_DATABASE_URL" >> $GITHUB_ENV \
|
||||
&& echo "SQLITE_DATABASE_URL=$SQLITE_DATABASE_URL" >> $GITHUB_ENV
|
||||
|
||||
- name: run migrations
|
||||
run: make migrate
|
||||
env:
|
||||
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
|
||||
- name: build
|
||||
run:
|
||||
make
|
||||
# env:
|
||||
# POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
# SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
env:
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
|
||||
# - name: build docker images
|
||||
# if: matrix.version == 'stable'
|
||||
|
@ -82,13 +90,6 @@ jobs:
|
|||
# if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'forgeflux-org/starchart'
|
||||
# run: make docker-publish
|
||||
#
|
||||
- name: run migrations
|
||||
run: make migrate
|
||||
env:
|
||||
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
|
||||
- name: run tests
|
||||
timeout-minutes: 40
|
||||
run:
|
||||
|
|
Loading…
Reference in a new issue