Skip to content

Commit

Permalink
#203: Stop API being cloned into a separate directory
Browse files Browse the repository at this point in the history
- This should help fix path issues with codecov
  • Loading branch information
MRichards99 committed Feb 2, 2021
1 parent f3498a8 commit 1d64040
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,39 +57,34 @@ jobs:
- name: Checkout DataGateway API
uses: actions/checkout@v2
with:
path: datagateway-api

# Prep for using the API for tests
- name: Create log file
run: touch logs.log
- name: Configure log file location
run: echo "`jq -r --arg REPO_DIR "$GITHUB_WORKSPACE/logs.log" \
'.log_location=$REPO_DIR' datagateway-api/config.json.example`" > datagateway-api/config.json.example
'.log_location=$REPO_DIR' config.json.example`" > config.json.example
- name: Create config.json
run: cp datagateway-api/config.json.example datagateway-api/config.json
run: cp config.json.example config.json

# Install Nox, Poetry and API's dependencies
- name: Install Nox
run: pip install nox==2020.8.22
- name: Install Poetry
run: pip install poetry==1.1.4
- name: Install dependencies
run: cd datagateway-api/ && poetry install
run: poetry install

- name: Add dummy data to icatdb
run: |
cd datagateway-api && poetry run python -m util.icat_db_generator -s 4 -y 3
poetry run python -m util.icat_db_generator -s 4 -y 3
# Run Nox tests session, saves and uploads a coverage report to codecov
- name: Run Nox tests session
run: cd datagateway-api && nox -s tests -- --cov=datagateway_api --cov-report=xml
run: nox -s tests -- --cov=datagateway_api --cov-report=xml
- name: Upload code coverage report
if: matrix.python-version == '3.6'
uses: codecov/codecov-action@v1
with:
directory: ./datagateway-api
gcov_root_dir: ./datagateway-api

linting:
runs-on: ubuntu-16.04
Expand Down

0 comments on commit 1d64040

Please sign in to comment.