-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update readme * Update macros.xml (#46) * Update spectralMatching.R (#47) * github workflows * add skip * readme underline cleanup * lint cleanup * update href * lintr update * more lintr fixes * version bump and sm update * createMSP output update * update createDatabase output * add missing libicu-dev * troubleshooting stringi error * troubleshooting stringi error * trying to remove cache * refresh cache * update sm test data * Update conda section of readme
- Loading branch information
Showing
31 changed files
with
1,500 additions
and
907 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 |
---|---|---|
@@ -0,0 +1,165 @@ | ||
name: Weekly global Tool Linting and Tests | ||
on: | ||
schedule: | ||
# Run at midnight every monday | ||
- cron: '0 0 * * 1' | ||
repository_dispatch: | ||
types: [run-all-tool-tests-command] | ||
env: | ||
GALAXY_RELEASE: release_20.09 | ||
jobs: | ||
setup: | ||
name: Setup cache | ||
if: github.repository_owner == 'computational-metabolomics' | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
steps: | ||
- name: Add reaction | ||
if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }} | ||
uses: peter-evans/create-or-update-comment@v1 | ||
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 | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache .cache/pip | ||
uses: actions/cache@v2 | ||
id: cache-pip | ||
with: | ||
path: ~/.cache/pip | ||
key: pip_cache_${{ matrix.python-version }}_${{ env.GALAXY_RELEASE }} | ||
# Install the `wheel` package so that when installing other packages which | ||
# are not available as wheels, pip will build a wheel for them, which can be cached. | ||
- name: Install wheel | ||
run: pip install wheel | ||
- name: Install Planemo | ||
run: pip install planemo | ||
- name: Fake a planemo run to update cache | ||
run: | | ||
touch tool.xml | ||
PIP_QUIET=1 planemo test --galaxy_python_version ${{ matrix.python-version }} --no_conda_auto_init --galaxy_branch $GALAXY_RELEASE | ||
test: | ||
name: Test tools | ||
# This job runs on Linux | ||
runs-on: ubuntu-latest | ||
needs: setup | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
chunk: [0,1,2,3] | ||
python-version: [3.7] | ||
services: | ||
postgres: | ||
image: postgres:11 | ||
env: | ||
POSTGRES_USER: postgres | ||
POSTGRES_PASSWORD: postgres | ||
POSTGRES_DB: postgres | ||
ports: | ||
- 5432:5432 | ||
steps: | ||
# checkout the repository | ||
# and use it as the current working directory | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache .cache/pip | ||
uses: actions/cache@v2 | ||
id: cache-pip | ||
with: | ||
path: ~/.cache/pip | ||
key: pip_cache_${{ matrix.python-version }}_${{ env.GALAXY_RELEASE }} | ||
- name: Install Planemo | ||
run: pip install planemo | ||
- name: Planemo ci_find_tools | ||
run: planemo ci_find_tools --chunk_count 4 --chunk ${{ matrix.chunk }} --exclude test_repositories --exclude packages --exclude deprecated --exclude_from .tt_skip --exclude_from .tt_biocontainer_skip --group_tools --output tool.list | ||
- name: Show repo list | ||
run: cat tool.list | ||
- name: Planemo test tools | ||
run: | | ||
mkdir json_output/ | ||
while read -r TOOLS; do | ||
if grep -qf .tt_biocontainer_skip <(echo $TOOLS); then | ||
PLANEMO_OPTIONS="" | ||
else | ||
PLANEMO_OPTIONS="--biocontainers --no_dependency_resolution --no_conda_auto_init" | ||
fi | ||
json=$(mktemp -u -p json_output --suff .json) | ||
PIP_QUIET=1 planemo test --database_connection postgresql://postgres:postgres@localhost:5432/galaxy $PLANEMO_OPTIONS --galaxy_branch $GALAXY_RELEASE --galaxy_python_version ${{ matrix.python-version }} --test_output_json $json $TOOLS || true | ||
docker system prune --all --force --volumes || true | ||
done < tool.list | ||
- name: Merge tool_test_output.json files | ||
run: planemo merge_test_reports json_output/*.json tool_test_output.json | ||
- name: Create tool_test_output.html | ||
run: planemo test_reports tool_test_output.json --test_output tool_test_output.html | ||
- name: Copy artifacts into place | ||
run: | | ||
mkdir upload | ||
mv tool_test_output.json tool_test_output.html upload/ | ||
- uses: actions/[email protected] | ||
with: | ||
name: 'Tool test output ${{ matrix.chunk }}' | ||
path: upload | ||
|
||
combine_outputs: | ||
name: Combine chunked test results | ||
needs: test | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
# This job runs on Linux | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
path: artifacts | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Planemo | ||
run: pip install planemo | ||
- name: Install jq | ||
run: sudo apt-get install jq | ||
- name: Combine outputs | ||
run: find artifacts -name tool_test_output.json -exec sh -c 'planemo merge_test_reports "$@" tool_test_output.json' sh {} + | ||
- name: Create tool_test_output.html | ||
run: planemo test_reports tool_test_output.json --test_output tool_test_output.html | ||
- name: Copy artifacts into place | ||
run: | | ||
mkdir upload | ||
mv tool_test_output.json tool_test_output.html upload/ | ||
- uses: actions/[email protected] | ||
with: | ||
name: 'All tool test results' | ||
path: upload | ||
|
||
- 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 | ||
|
||
- name: Create comment | ||
if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }} | ||
uses: peter-evans/create-or-update-comment@v1 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
issue-number: ${{ github.event.client_payload.github.payload.issue.number }} | ||
body: | | ||
[Find all tool test results here][1] | ||
[1]: ${{ steps.vars.outputs.run-url }} | ||
- name: Check status of combined outputs | ||
run: | | ||
if jq '.["tests"][]["data"]["status"]' upload/tool_test_output.json | grep -v "success"; then | ||
echo "Unsuccessful tests found, inspect the 'All tool test results' artifact for details." | ||
exit 1 | ||
fi |
Oops, something went wrong.