Created
January 21, 2021 04:24
-
-
Save CalebEverett/3df3bcceba2db501b70d1132a921af75 to your computer and use it in GitHub Desktop.
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
name: CI/CD | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
env: | |
CANVAS_ASSIGNMENT_ID: 442683 # Test Assignment | |
CANVAS_COURSE_ID: 81475 | |
CANVAS_QUIZ_ID: 201703 | |
CANVAS_TOKEN: ${{ secrets.CANVAS_TOKEN }} | |
CANVAS_URL: https://canvas.harvard.edu | |
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pipenv | |
pipenv install --dev --ignore-pipfile --deploy | |
- name: Install and setup code coverage tool | |
run: | | |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter | |
chmod +x ./cc-test-reporter | |
./cc-test-reporter before-build | |
- name: Test with pytest | |
run: | | |
pipenv run pytest --cov-report xml --cov-report term | |
- name: Report coverage to codeclimate | |
run: | | |
./cc-test-reporter after-build --exit-code 0 | |
- name: Submit to Canvas | |
if: true # Set this to true to submit | |
run: | | |
pipenv run python submit.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment