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

Update GitHub actions from tools-iuc #162

Merged
merged 2 commits into from
Oct 27, 2023
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
40 changes: 39 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
types: [run-all-tool-tests-command]
env:
GALAXY_FORK: galaxyproject
GALAXY_BRANCH: release_22.05
GALAXY_BRANCH: release_23.1
MAX_CHUNKS: 40
jobs:
setup:
Expand Down Expand Up @@ -74,6 +74,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.7']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache .cache/pip
uses: actions/cache@v3
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 tests,output,inputs,help,general,command,citations,tool_xsd,xml_order,tool_urls,shed_metadata
- uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: 'Tool linting output'
path: lint_report.txt

test:
name: Test tools
# This job runs on Linux
Expand Down Expand Up @@ -112,6 +148,8 @@ jobs:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
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 Down
71 changes: 63 additions & 8 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
name: Galaxy Tool Linting and Tests for push and PR
on: [push, pull_request]
on:
pull_request:
paths-ignore:
- '.github/**'
- 'deprecated/**'
- 'docs/**'
- '*'
push:
branches:
- main
- master
paths-ignore:
- '.github/**'
- 'deprecated/**'
- 'docs/**'
- '*'
env:
GALAXY_FORK: galaxyproject
GALAXY_BRANCH: release_22.05
GALAXY_BRANCH: release_23.1
MAX_CHUNKS: 4
MAX_FILE_SIZE: 3M
concurrency:
Expand Down Expand Up @@ -110,11 +125,21 @@ jobs:
with:
path: ~/.cache/pip
key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }}

- name: Set fail level for pull request
if: ${{ github.event_name == 'pull_request' }}
run:
echo "FAIL_LEVEL=warn" >> "$GITHUB_ENV"
- name: Set fail level for merge
if: ${{ github.event_name != 'pull_request' }}
run:
echo "FAIL_LEVEL=error" >> "$GITHUB_ENV"
- name: Planemo lint
uses: galaxyproject/planemo-ci-action@v1
id: lint
with:
mode: lint
fail-level: ${{ env.FAIL_LEVEL }}
repository-list: ${{ needs.setup.outputs.repository-list }}
tool-list: ${{ needs.setup.outputs.tool-list }}
- uses: actions/upload-artifact@v3
Expand All @@ -127,7 +152,7 @@ jobs:
flake8:
name: Lint Python scripts
needs: setup
if: ${{ needs.setup.outputs.repository-list != '' }}
if: ${{ github.event_name == 'pull_request' && needs.setup.outputs.repository-list != '' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -159,7 +184,7 @@ jobs:
lintr:
name: Lint R scripts
needs: setup
if: ${{ needs.setup.outputs.repository-list != '' }}
if: ${{ github.event_name == 'pull_request' && needs.setup.outputs.repository-list != '' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down Expand Up @@ -189,7 +214,7 @@ jobs:
- name: lintr
run: |
library(lintr)
linters <- linters_with_defaults(line_length_linter = NULL, cyclocomp_linter = NULL, object_usage_linter = NULL)
linters <- linters_with_defaults(line_length_linter = NULL, cyclocomp_linter = NULL, object_usage_linter = NULL, object_name_linter = NULL)
con <- file("repository_list.txt", "r")
status <- 0
while (TRUE) {
Expand Down Expand Up @@ -285,6 +310,8 @@ jobs:
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
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 @@ -297,7 +324,7 @@ jobs:
chunk-count: ${{ needs.setup.outputs.chunk-count }}
galaxy-slots: ${{ steps.cpu-cores.outputs.count }}
# Limit each test to 15 minutes
test_timeout: 900
test_timeout: 1800
- uses: actions/upload-artifact@v3
with:
name: 'Tool test output ${{ matrix.chunk }}'
Expand All @@ -311,7 +338,7 @@ jobs:
combine_outputs:
name: Combine chunked test results
needs: [setup, test]
if: ${{ needs.setup.outputs.repository-list != '' }}
if: ${{ always() && needs.setup.outputs.repository-list != '' }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -344,11 +371,17 @@ jobs:
id: check
with:
mode: check
- name: Check if all test chunks succeeded
run: |
NFILES=$(ls artifacts/ | grep "Tool test output" | wc -l)
if [[ "${{ needs.setup.outputs.chunk-count }}" != "$NFILES" ]]; then
exit 1
fi

# deploy the tools to the toolsheds (first TTS for testing)
deploy:
name: Deploy
needs: [setup, lint, flake8, lintr, combine_outputs]
needs: [setup, lint, combine_outputs]
if: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'TGAC' }}
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -383,6 +416,28 @@ jobs:
shed-target: toolshed
shed-key: ${{ secrets.TS_API_KEY }}

deploy-report:
name: Report deploy status
needs: [deploy]
if: ${{ always() && needs.deploy.result != 'success' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'TGAC' }}
runs-on: ubuntu-latest
steps:
# report to the PR if deployment failed
- name: Get PR object
uses: 8BitJonny/gh-get-current-pr@2.2.0
id: getpr
with:
sha: ${{ github.event.after }}
- name: Create comment
uses: peter-evans/create-or-update-comment@v2
with:
token: ${{ secrets.PAT }}
issue-number: ${{ steps.getpr.outputs.number }}
body: |
Attention: deployment ${{ needs.deploy.result }}!

https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

determine-success:
name: Check workflow success
needs: [setup, lint, flake8, lintr, file_sizes, combine_outputs]
Expand Down
4 changes: 2 additions & 2 deletions tools/t_coffee/t_coffee.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ t_coffee '$input' $method_opt $output_opt -n_core \${GALAXY_SLOTS:-1} -run_name
<option value="t_coffee_msa">t_coffee_msa</option>
<option value="kalign_msa">kalign_msa</option>
</param>
<param name="outputs" type="select" multiple="true" optional="false" display="checkboxes" label="Output formats">
<param name="outputs" type="select" multiple="true" optional="false" label="Output formats">
<option value="clustalw_aln">clustalw_aln</option>
<option value="dnd" selected="true">dnd</option>
<option value="fasta_aln">fasta_aln</option>
Expand Down Expand Up @@ -183,7 +183,7 @@ This tool is a wrapper for the T-Coffee multiple sequence alignment suite. The i

This wrapper offers selected advanced T-Coffee options like the selection of the alignment methods to use: ''Pairwise Structual Method'', ''Multiple Sequence Alignment Methods'' or ''Pairwise Sequence Alignment Methods''.

The T-Coffee documentation can be found at http://www.tcoffee.org/Projects/tcoffee/ .
The T-Coffee documentation can be found at https://tcoffee.org/Projects/tcoffee/index.html .

**Example**

Expand Down
Loading