CI #119
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
pull_request: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
test: | |
name: Run pyparament test suite | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2.2.2 | |
with: | |
python-version: 3.9 | |
- name: Install Kaggle API | |
run: pip install kaggle | |
- name: Synthesize test script | |
run: | | |
sed -i -e "s~{{ GITHUB_SHA }}~$GITHUB_SHA~g" test/run_parament_testsuite.py | |
sed -i -e "s~{{ GITHUB_REPOSITORY }}~$GITHUB_REPOSITORY~g" test/run_parament_testsuite.py | |
cat test/run_parament_testsuite.py | |
- name: Deploy to Kaggle | |
env: | |
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }} | |
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }} | |
run: | | |
echo "Pushing script to Kaggle..." | |
kaggle kernels push -p test | |
echo "Waiting for run to complete (1 minute)..." | |
sleep 1m | |
echo "Retrieving output..." | |
kaggle kernels output polwelter/run-parament-testsuite -p test/output | |
tree test/output | |
kaggle kernels status polwelter/run-parament-testsuite | grep -q "complete" || exit 1 | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: Test results | |
path: test/output/* | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v1 | |
if: always() | |
with: | |
files: test/output/report_test.xml | |
- uses: codecov/codecov-action@v1 | |
with: | |
files: test/output/coverage.xml | |
flags: unittests # optional | |
fail_ci_if_error: true # optional (default = false) |