-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add coverage link to docs page sidebar
- Loading branch information
1 parent
148de05
commit 15345c5
Showing
3 changed files
with
16 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ on: | |
- staging | ||
- development | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
|
@@ -31,11 +34,6 @@ jobs: | |
# Parse JSON with multiline strings, using delimeter (Github specific) | ||
to_envs() { jq -r "to_entries[] | \"\(.key)<<$delim\n\(.value)\n$delim\n\""; } | ||
# Set all vars | ||
echo "TAG_OVERRIDE=${TAG_OVERRIDE}" >> $GITHUB_ENV | ||
echo "TARGET_OVERRIDE=${TARGET_OVERRIDE}" >> $GITHUB_ENV | ||
echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_ENV | ||
# Set VARS_CONTEXT if not null | ||
if [ "${VARS_CONTEXT}" != "null" ]; then | ||
echo "${VARS_CONTEXT}" | to_envs >> $GITHUB_ENV | ||
|
@@ -53,16 +51,12 @@ jobs: | |
curl -L https://github.com/a8m/envsubst/releases/download/v1.2.0/envsubst-`uname -s`-`uname -m` -o envsubst | ||
chmod +x envsubst | ||
# Check if .env.example exists | ||
if [ -f .env.example ]; then | ||
echo "Substituting variables from .env.example --> .env" | ||
./envsubst < .env.example > .env | ||
else | ||
echo ".env.example not found, creating .env with GIT_BRANCH only" | ||
echo "GIT_BRANCH=${GIT_BRANCH}" > .env | ||
fi | ||
echo "Substituting variables from .env.example --> .env" | ||
./envsubst < .env.example > .env | ||
echo "GIT_BRANCH=${GIT_BRANCH}" >> .env | ||
# Set all vars | ||
echo "TAG_OVERRIDE=${TAG_OVERRIDE}" >> .env | ||
echo "TARGET_OVERRIDE=${TARGET_OVERRIDE}" >> .env | ||
echo "GIT_BRANCH=${GIT_BRANCH}" >> .env | ||
- name: Run Tests With Coverage | ||
|
@@ -78,23 +72,16 @@ jobs: | |
- name: Upload Coverage | ||
run: | | ||
# Pull content from gh-pages | ||
mkdir tmp_pages | ||
cd tmp_pages | ||
git init | ||
git pull https://github.com/${{ github.repository }}.wiki | ||
cd .. | ||
# Sync coverage index and badge using rsync | ||
sudo apt-get update && sudo apt-get install -y rsync --no-install-recommends | ||
# Checkout to gh-pages | ||
git config user.name svchot | ||
git config user.email [email protected] | ||
git checkout gh-pages | ||
# Overwrite coverage index and badge | ||
echo "Coverage dir contents:" | ||
ls ${{ github.workspace }}/coverage | ||
echo "" | ||
cp ${{ github.workspace }}/coverage/coverage.* docs/ | ||
rsync -av --delete docs/ tmp_pages/ --exclude .git | ||
mv ${{ github.workspace }}/coverage/* ${{ github.workspace }} | ||
# Assess diff | ||
cd tmp_pages | ||
git --no-pager diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,7 @@ temp_webmaps/Naivasha | |
# mkdocs | ||
site | ||
docs/apidocs | ||
coverage | ||
**/**/coverage* | ||
|
||
# Bash install script | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters