-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split diagnostics to a separate CI job
- Loading branch information
Showing
1 changed file
with
26 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,28 +75,40 @@ jobs: | |
- name: Upload test coverage to Codecov.io | ||
uses: codecov/codecov-action@v3 | ||
|
||
# TODO Use https://github.com/marketplace/actions/setup-rclone-action | ||
- name: Install rclone | ||
if: env.pr_from_main_repo && matrix.run-diagnostics | ||
diagnostics: | ||
if: env.pr_from_main_repo | ||
needs: [pytest] | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: true | ||
|
||
- uses: actions/setup-python@v4 | ||
with: # Should be the same as the latest supported version, above | ||
python-version: "3.12" | ||
cache: pip | ||
cache-dependency-path: "**/pyproject.toml" | ||
|
||
- name: Upgrade pip | ||
run: python -m pip install --upgrade pip | ||
|
||
- name: Install the Python package and its dependencies | ||
run: pip install .[tests] | ||
|
||
- name: Set up Rclone | ||
uses: AnimMouse/setup-rclone@v1 | ||
|
||
- name: Create diagnostics and upload to Google Cloud Storage | ||
env: | ||
service_account_json: ${{ secrets.GCS_SERVICE_ACCOUNT_1 }} | ||
run: | | ||
mkdir -p $HOME/.cache | ||
pushd $HOME/.cache | ||
curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip | ||
popd | ||
unzip $HOME/.cache/rclone-current-linux-amd64.zip | ||
ls -d rclone-v* > $GITHUB_PATH | ||
echo "$service_account_json" >ci/service-account-key.json | ||
- name: Create diagnostics and upload to Google Cloud Storage | ||
if: env.pr_from_main_repo && matrix.run-diagnostics | ||
run: | | ||
item historical diagnostics output/ | ||
rclone --progress copy output ${{ env.gcs_bucket }}${{ github.run_id }}/ | ||
- uses: LouisBrunner/[email protected] | ||
if: env.pr_from_main_repo && matrix.run-diagnostics | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: Upload historical database & diagnostics | ||
|