chore: load env vars where relevant
This commit is contained in:
parent
89cdee765a
commit
ec97f096de
2 changed files with 46 additions and 51 deletions
29
.github/workflows/coverage.yml
vendored
29
.github/workflows/coverage.yml
vendored
|
@ -44,7 +44,6 @@ jobs:
|
|||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
|
||||
- name: Install ${{ matrix.version }}
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
|
@ -67,24 +66,22 @@ jobs:
|
|||
run: python ./scripts/gitea.py
|
||||
|
||||
- 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 }}"
|
||||
run: make migrate
|
||||
env:
|
||||
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
|
||||
- name: Generate coverage file
|
||||
if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'pull_request')
|
||||
uses:
|
||||
actions-rs/tarpaulin@v0.1
|
||||
# env:
|
||||
# # GIT_HASH is dummy value. I guess build.rs is skipped in tarpaulin
|
||||
# # execution so this value is required for preventing meta tests from
|
||||
# # panicking
|
||||
# GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61
|
||||
# POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
# SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
uses: actions-rs/tarpaulin@v0.1
|
||||
env:
|
||||
# GIT_HASH is dummy value. I guess build.rs is skipped in tarpaulin
|
||||
# execution so this value is required for preventing meta tests from
|
||||
# panicking
|
||||
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
with:
|
||||
args: "--all-features --no-fail-fast --workspace=db/db-sqlx-sqlite,. -t 1200"
|
||||
# args: "--all-features --no-fail-fast --workspace=database/db-sqlx-postgres,database/db-sqlx-sqlite,. -t 1200"
|
||||
|
|
68
.github/workflows/linux.yml
vendored
68
.github/workflows/linux.yml
vendored
|
@ -17,7 +17,8 @@ jobs:
|
|||
# - nightly
|
||||
|
||||
name: ${{ matrix.version }} - x86_64-unknown-linux-gnu
|
||||
runs-on: ubuntu-latest
|
||||
runs-on:
|
||||
ubuntu-latest
|
||||
|
||||
# services:
|
||||
# postgres:
|
||||
|
@ -66,49 +67,45 @@ jobs:
|
|||
&& 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
|
||||
|
||||
- name: build
|
||||
run: make
|
||||
run:
|
||||
make
|
||||
# env:
|
||||
# POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
# SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
|
||||
# - name: build docker images
|
||||
# if: matrix.version == 'stable'
|
||||
# run: make docker
|
||||
#
|
||||
# - name: publish docker images
|
||||
# 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: build docker images
|
||||
# if: matrix.version == 'stable'
|
||||
# run: make docker
|
||||
#
|
||||
# - name: publish docker images
|
||||
# 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: make test
|
||||
# env:
|
||||
# GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||
# POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
# SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
run:
|
||||
make test
|
||||
env:
|
||||
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
|
||||
- name: generate documentation
|
||||
if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'forgeflux-org/starchart'
|
||||
run: make doc
|
||||
# env:
|
||||
# GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||
# POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
# SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
run:
|
||||
make doc
|
||||
env:
|
||||
GIT_HASH: 8e77345f1597e40c2e266cb4e6dee74888918a61 # dummy value
|
||||
POSTGRES_DATABASE_URL: "${{ env.POSTGRES_DATABASE_URL }}"
|
||||
SQLITE_DATABASE_URL: "${{ env.SQLITE_DATABASE_URL }}"
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
if: matrix.version == 'stable' && (github.ref == 'refs/heads/master' || github.event_name == 'push') && github.repository == 'forgeflux-org/starchart'
|
||||
|
@ -116,7 +113,8 @@ jobs:
|
|||
with:
|
||||
branch: gh-pages
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
FOLDER: ./target/doc/
|
||||
FOLDER:
|
||||
./target/doc/
|
||||
|
||||
# - name: deploy
|
||||
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'realaravinth/realaravinth' }}
|
||||
|
|
Loading…
Reference in a new issue