Skip to content

Commit

Permalink
TEMPORARY: Debug pytest workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Feb 19, 2021
1 parent 67c627f commit 6405fe8
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/0-pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
gcs_bucket: gcs:data.transportenergy.org/historical/ci/
gcs_url: https://storage.googleapis.com/data.transportenergy.org/historical/ci/
RCLONE_CONFIG: ci/rclone.conf
pr_from_main_repo: github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.label, 'transportenergy:')

jobs:
pytest:
Expand Down Expand Up @@ -58,8 +59,17 @@ jobs:
- name: Upload test coverage to Codecov.io
uses: codecov/codecov-action@v1

- name: TEMPORARY Debug
env:
foo: ${{ env.pr_from_main_repo }}
event_json: ${{ toJSON(github.event) }}
run: |
echo "$event_json"
echo "${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.label, 'transportenergy:')}}"
echo "$foo"
- name: Install rclone
if: ${{ startsWith(github.event.head.label, 'transportenergy:') && matrix.run-diagnostics }}
if: env.pr_from_main_repo && matrix.run-diagnostics
env:
service_account_json: ${{ secrets.GCS_SERVICE_ACCOUNT_1 }}
run: |
Expand All @@ -73,14 +83,14 @@ jobs:
- name: Create diagnostics and upload to Google Cloud Storage
# Only on PRs from the main repo
if: ${{ startsWith(github.event.head.label, 'transportenergy:') && matrix.run-diagnostics }}
if: env.pr_from_main_repo && matrix.run-diagnostics
run: |
item historical diagnostics output/
rclone --progress copy output ${{ env.gcs_bucket }}${{ github.run_number }}/
- uses: LouisBrunner/checks-action@v1.1.1
# Only on PRs from the main repo
if: ${{ startsWith(github.event.head.label, 'transportenergy:') && matrix.run-diagnostics }}
if: env.pr_from_main_repo && matrix.run-diagnostics
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: Upload historical database & diagnostics
Expand Down

0 comments on commit 6405fe8

Please sign in to comment.