Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: update workflows to most recent actions #69

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 68 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# From https://github.com/galaxyproject/galaxy-tool-repository-template/blob/main/.github/workflows/ci.yaml
# License (spdx): MIT
# Last updated: 2022-07-14
# Last updated: 2024-10-29
# Search for "MODIFIED" to see modifications from original
#
name: Weekly global Tool Linting and Tests
Expand All @@ -15,7 +15,7 @@ on:
# MODIFIED END
env:
GALAXY_FORK: galaxyproject
GALAXY_BRANCH: release_23.1 # MODIFIED
GALAXY_BRANCH: release_24.1
MAX_CHUNKS: 40
jobs:
setup:
Expand All @@ -31,31 +31,31 @@ jobs:
chunk-list: ${{ steps.discover.outputs.chunk-list }}
strategy:
matrix:
python-version: ['3.7']
python-version: ['3.11']
steps:
- name: Add reaction
if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }}
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v4
with:
token: ${{ secrets.PAT }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: hooray
reactions: hooray
- name: Set galaxy fork and branch
id: get-fork-branch
run: |
TMP="${{ github.event.client_payload.slash_command.args.named.fork }}"
echo "::set-output name=fork::${TMP:-$GALAXY_FORK}"
echo "fork=${TMP:-$GALAXY_FORK}" >> $GITHUB_OUTPUT
TMP="${{ github.event.client_payload.slash_command.args.named.branch }}"
echo "::set-output name=branch::${TMP:-$GALAXY_BRANCH}"
echo "branch=${TMP:-$GALAXY_BRANCH}" >> $GITHUB_OUTPUT
- name: Determine latest commit in the Galaxy repo
id: get-galaxy-sha
run: echo "::set-output name=galaxy-head-sha::$(git ls-remote https://github.com/${{ steps.get-fork-branch.outputs.fork }}/galaxy refs/heads/${{ steps.get-fork-branch.outputs.branch }} | cut -f1)"
- uses: actions/setup-python@v1
run: echo "galaxy-head-sha=$(git ls-remote https://github.com/${{ steps.get-fork-branch.outputs.fork }}/galaxy refs/heads/${{ steps.get-fork-branch.outputs.branch }} | cut -f1)" >> $GITHUB_OUTPUT
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache .cache/pip
uses: actions/cache@v2
uses: actions/cache@v4
id: cache-pip
with:
path: ~/.cache/pip
Expand All @@ -64,7 +64,7 @@ jobs:
# are not available as wheels, pip will build a wheel for them, which can be cached.
- name: Install wheel
run: pip install wheel
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Fake a Planemo run to update cache and determine commit range, repositories, and chunks
Expand All @@ -82,6 +82,42 @@ jobs:
run: |
echo 'Using ${{ steps.discover.outputs.chunk-count }} chunks (${{ steps.discover.outputs.chunk-list }})'

lint:
name: Check for missing containers
needs: setup
if: ${{ needs.setup.outputs.repository-list != '' || needs.setup.outputs.tool-list != '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache .cache/pip
uses: actions/cache@v4
id: cache-pip
with:
path: ~/.cache/pip
key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }}
- name: Planemo lint
uses: galaxyproject/planemo-ci-action@v1
id: lint
with:
mode: lint
repository-list: ${{ needs.setup.outputs.repository-list }}
tool-list: ${{ needs.setup.outputs.tool-list }}
additional-planemo-options: --biocontainers -s stdio,tests,output,inputs,help,general,command,citations,tool_xsd,xml_order,tool_urls,shed_metadata,urls,readme,shed_yaml,repository_dependencies,tool_dependencies_actions,tool_dependencies_sha256sum,tool_dependencies_xsd,expansion
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: 'Tool linting output'
path: lint_report.txt

test:
name: Test tools
# This job runs on Linux
Expand All @@ -92,7 +128,7 @@ jobs:
fail-fast: false
matrix:
chunk: ${{ fromJson(needs.setup.outputs.chunk-list) }}
python-version: ['3.7']
python-version: ['3.11']
services:
postgres:
image: postgres:11
Expand All @@ -105,18 +141,23 @@ jobs:
steps:
# checkout the repository
# and use it as the current working directory
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache .cache/pip
uses: actions/cache@v2
uses: actions/cache@v4
id: cache-pip
with:
path: ~/.cache/pip
key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }}
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Clean dotnet folder for space
run: rm -Rf /usr/share/dotnet
- name: Planemo test
uses: galaxyproject/planemo-ci-action@v1
id: test
Expand All @@ -127,7 +168,10 @@ jobs:
galaxy-branch: ${{ needs.setup.outputs.branch }}
chunk: ${{ matrix.chunk }}
chunk-count: ${{ needs.setup.outputs.chunk-count }}
- uses: actions/upload-artifact@v2
galaxy-slots: ${{ steps.cpu-cores.outputs.count }}
# Limit each test to 15 minutes
test_timeout: 900
- uses: actions/upload-artifact@v4
with:
name: 'Tool test output ${{ matrix.chunk }}'
path: upload
Expand All @@ -142,18 +186,18 @@ jobs:
needs: [setup, test]
strategy:
matrix:
python-version: ['3.7']
python-version: ['3.11']
# This job runs on Linux
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
path: artifacts
- uses: actions/setup-python@v1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache .cache/pip
uses: actions/cache@v2
uses: actions/cache@v4
id: cache-pip
with:
path: ~/.cache/pip
Expand All @@ -164,19 +208,20 @@ jobs:
with:
mode: combine
html-report: true
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: 'All tool test results'
path: upload
- run: cat upload/tool_test_output.md >> $GITHUB_STEP_SUMMARY
- name: Create URL to the run output
if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }}
id: vars
run: echo "::set-output name=run-url::https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT

# MODIFIED START
# - name: Create comment
# if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }}
# uses: peter-evans/create-or-update-comment@v1
# uses: peter-evans/create-or-update-comment@v4
# with:
# token: ${{ secrets.PAT }}
# repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
Expand All @@ -190,7 +235,6 @@ jobs:
#
# [1]: ${{ steps.vars.outputs.run-url }}
# MODIFIED END

- name: Check outputs
uses: galaxyproject/planemo-ci-action@v1
id: check
Expand Down
Loading
Loading