cron-2023.5-core-ubuntu-latest #241
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: cron-2023.5-core-ubuntu-latest | |
# Edit these four variables as necessary, everything else should work as-is | |
env: | |
CONF_PLATFORM: ubuntu-latest | |
CONF_DISTRO: core | |
CONF_EPOCH: '2023.5' | |
CONF_ISSUE_NUM: 71 | |
on: | |
workflow_dispatch: {} | |
schedule: | |
# dev - every 8 hours, starting at the zeroth hour | |
# - cron: '37 0,8,16 * * *' | |
# rel - every other day | |
- cron: '37 3 */2 * *' | |
jobs: | |
conf: | |
runs-on: ubuntu-latest # this job is always run on linux | |
outputs: | |
platform: ${{ steps.set-vars.outputs.platform }} | |
distro: ${{ steps.set-vars.outputs.distro }} | |
epoch: ${{ steps.set-vars.outputs.epoch }} | |
issue-number: ${{ steps.set-vars.outputs.issue-number }} | |
steps: | |
- name: set-vars | |
id: set-vars | |
run: | | |
echo "::set-output name=platform::$CONF_PLATFORM" | |
echo "::set-output name=distro::$CONF_DISTRO" | |
echo "::set-output name=epoch::$CONF_EPOCH" | |
echo "::set-output name=issue-number::$CONF_ISSUE_NUM" | |
integrate: | |
needs: conf | |
runs-on: ${{ needs.conf.outputs.platform }} | |
outputs: | |
pkgs: ${{ steps.destructure.outputs.pkgs }} | |
metapackage-spec: ${{ steps.destructure.outputs.metapackage-spec }} | |
q2-channel: ${{ steps.destructure.outputs.q2-channel }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: destructure metapackage | |
id: destructure | |
uses: ./.github/actions/destructure-metapackage | |
with: | |
distro: ${{ needs.conf.outputs.distro }} | |
epoch: ${{ needs.conf.outputs.epoch }} | |
test-package: | |
name: test ${{ matrix.pkg.name }} | |
needs: [conf, integrate] | |
runs-on: ${{ needs.conf.outputs.platform }} | |
strategy: | |
fail-fast: false | |
matrix: | |
pkg: ${{ fromJson(needs.integrate.outputs.pkgs) }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/configure-conda | |
- uses: ./.github/actions/test-package | |
with: | |
pkg-url: ${{ matrix.pkg.url }} | |
q2-channel: ${{ needs.integrate.outputs.q2-channel }} | |
metapackage-spec: ${{ needs.integrate.outputs.metapackage-spec }} | |
phone-home: | |
needs: [conf, test-package] | |
runs-on: ${{ needs.conf.outputs.platform }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: ./.github/actions/configure-conda | |
- uses: ./.github/actions/phone-home-pass | |
with: | |
token: ${{ secrets.LIBRARY_TOKEN }} | |
epoch: ${{ needs.conf.outputs.epoch }} | |
distro: ${{ needs.conf.outputs.distro }} | |
platform: ${{ needs.conf.outputs.platform }} | |
comment-on-any-failure: | |
runs-on: ubuntu-latest # this job is always run on linux | |
needs: [conf, integrate, test-package, phone-home] | |
if: | | |
always() && (needs.conf.result == 'failure' || | |
needs.integrate.result == 'failure' || | |
needs.test-package.result == 'failure' || | |
needs.phone-home.result == 'failure') | |
steps: | |
- name: comment on failure | |
uses: peter-evans/create-or-update-comment@v1 | |
with: | |
issue-number: ${{ needs.conf.outputs.issue-number }} | |
body: > | |
[GHA run](https://github.com/qiime2/package-integration/actions/runs/${{ github.run_id }}) | |
${{ github.run_number }} for ${{ needs.conf.outputs.epoch }} | |
on ${{ needs.conf.outputs.platform }} failed. |