Skip to content

fix db url name

fix db url name #325

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: build
on:
push:
branches: "**"
tags:
- '**'
pull_request:
branches: [ master ]
jobs:
build-and-test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Compare version with git tag
if: startsWith(github.ref, 'refs/tags/')
run: |
file_version=$(cat geniust/VERSION)
tag_version=${GITHUB_REF#refs/*/}
if test "$file_version" = "$tag_version";
then
echo "Versions match! >> $file_version"
else
echo "Versions don't match! >> FILE=$file_version != TAG=$tag_version"
exit 1
fi
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8.10
- name: Cache Pip dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .[dev]
- name: Run tox
run: tox
- name: Archive code coverage results
if: github.ref == 'refs/heads/master'
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: coverage.xml
upload_coverage:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-18.04
env:
CC_TEST_REPORTER_URL: https://codeclimate.com/downloads/test-reporter/test-reporter-0.7.0-linux-amd64
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
needs: build-and-test
steps:
- uses: actions/checkout@v2
- name: Set ENV for codeclimate
run: |
echo "{GIT_BRANCH}={$GITHUB_REF}" >> $GITHUB_ENV
echo "{GIT_COMMIT_SHA}={$GITHUB_SHA}" >> $GITHUB_ENV
- name: Download test coverage reporter
run: curl -L $CC_TEST_REPORTER_URL > cc-test-reporter
- name: Give test coverage reporter executable permissions
run: chmod +x cc-test-reporter
- name: Download a single artifact
uses: actions/download-artifact@v2
with:
name: code-coverage-report
- name: Upload results to Code Climate
run: |
./cc-test-reporter after-build -t=coverage.py