Skip to content

Commit

Permalink
Schedule weekly CI runs and add downstream tests (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt authored May 1, 2022
1 parent 5894868 commit 1bff316
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 8 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+a[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+b[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
# Dry-run only
workflow_dispatch:
schedule:
- cron: '0 18 * * SUN'

jobs:
conda_build:
Expand Down Expand Up @@ -57,12 +61,12 @@ jobs:
npm whoami
npm -v
- name: dev deploy
if: (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))
if: (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --recipe=core
doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --recipe=recommended
- name: main deploy
if: (!(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
if: (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --label=main --recipe=core
doit package_upload --token=$CONDA_UPLOAD_TOKEN --label=dev --label=main --recipe=recommended
Expand All @@ -76,12 +80,12 @@ jobs:
doit develop_install $CHANS_DEV -o build
python setup.py develop
- name: npm dev deploy
if: (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))
if: (github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
cd ./geoviews
npm publish --tag dev
- name: npm main deploy
if: (!(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
if: (github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
run: |
cd ./geoviews
npm publish --tag latest
Expand Down Expand Up @@ -141,6 +145,7 @@ jobs:
git status
git diff
- name: pip upload
if: github.event_name == 'push'
run: |
eval "$(conda shell.bash hook)"
conda activate test-environment
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,16 @@ on:
workflow_dispatch:
inputs:
target:
description: 'dev or main'
description: 'Site to build and deploy'
type: choice
options:
- dev
- main
- dryrun
required: true
default: 'dev'
default: dryrun
schedule:
- cron: '0 18 * * SUN'

jobs:
build_docs:
Expand Down Expand Up @@ -75,14 +82,18 @@ jobs:
nbsite build --what=html --output=builtdocs --org holoviz --project-name geoviews
- name: Deploy dev
uses: peaceiris/actions-gh-pages@v3
if: (github.event.inputs.target == 'dev' || contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc'))
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') ||
(github.event_name == 'push' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
external_repository: pyviz-dev/geoviews
publish_dir: ./builtdocs
force_orphan: true
- name: Deploy main
if: (github.event.inputs.target == 'main' || !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'main') ||
(github.event_name == 'push' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/downstream_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: downstream_tests

on:
# Run this workflow after the build workflow has completed.
workflow_run:
workflows: [packages]
types: [completed]
# Or by triggering it manually via Github's UI
workflow_dispatch:
inputs:
manual:
description: don't change me!
type: boolean
required: true
default: true

jobs:
downstream_tests:
uses: pyviz-dev/holoviz_tasks/.github/workflows/run_downstream_tests.yaml@main
with:
downstream_repos_as_json: "{\"downstream_repo\":[\"hvplot\"]}"
secrets:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2 changes: 2 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ on:
branches:
- '*'
workflow_dispatch:
schedule:
- cron: '0 18 * * SUN'

jobs:
test_suite:
Expand Down

0 comments on commit 1bff316

Please sign in to comment.