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