Skip to content

Commit

Permalink
Move tests from bash to GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
bebatut committed Jun 25, 2024
1 parent d7d63ec commit 7c400f6
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 59 deletions.
68 changes: 56 additions & 12 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,73 @@ name: Run tests
on: [push, pull_request]

jobs:
test:
test-tools:
runs-on: ubuntu-20.04
environment: fetch-tools
strategy:
matrix:
python-version: [3.8]
subset:
- test.list
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: '3.11'
- name: Install requirement
run: python -m pip install -r requirements.txt
- name: Test tool extraction
- name: Tool extraction
# run: bash bin/extract_all_tools.sh
run: |
bash ./bin/extract_all_tools_test.sh "${{ matrix.subset }}"
python bin/extract_galaxy_tools.py \
extractools \
--api $GITHUB_API_KEY \
--all-tools "results/test_tools.tsv" \
--all-tools-json "results/test_tools.json" \
--planemo-repository-list "test.list" \
--test
env:
GITHUB_API_KEY: ${{ secrets.GH_API_TOKEN }}
- name: Test tutorial extraction and filtering
- name: Tool filter
run: |
bash ./bin/extract_filter_tutorials_test.sh
python bin/extract_galaxy_tools.py \
filtertools \
--tools "results/all_tools.json" \
--ts-filtered-tools "results/microgalaxy/tools_filtered_by_ts_categories.tsv" \
--filtered-tools "results/microgalaxy/tools.tsv" \
--categories "data/communities/microgalaxy/categories" \
--status "data/communities/microgalaxy/tool_status.tsv"
- name: Create interactive table
run: |
python bin/create_interactive_table.py \
--table "results/microgalaxy/tools.tsv" \
--template "data/interactive_table_template.html" \
--output "results/microgalaxy/index.html"
- name: Create wordcloud
run: |
python bin/create_wordcloud.py \
--table "results/microgalaxy/tools.tsv" \
--wordcloud_mask "data/usage_stats/wordcloud_mask.png" \
--output "results/microgalaxy/tools_wordcloud.png" \
--stats_column "No. of tool users (2022-2023) (usegalaxy.eu)"
test-tutorials:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install requirement
run: python -m pip install -r requirements.txt
- name: Tutorial extraction
run: |
python bin/extract_gtn_tutorials.py \
extracttutorials \
--all_tutorials "results/test_tutorials.json" \
--tools "results/all_tools.json" \
--api $PLAUSIBLE_API_KEY \
--test
env:
PLAUSIBLE_API_KEY: ${{ secrets.PLAUSIBLE_API_TOKEN }}
PLAUSIBLE_API_KEY: ${{ secrets.PLAUSIBLE_API_TOKEN }}
- name: Tutorial filtering
run: |
python bin/extract_gtn_tutorials.py \
filtertutorials \
--all_tutorials "results/test_tutorials.json" \
--filtered_tutorials "results/microgalaxy/test_tutorials.tsv" \
--tags "data/communities/microgalaxy/tutorial_tags"
15 changes: 0 additions & 15 deletions bin/extract_all_tools_test.sh

This file was deleted.

32 changes: 0 additions & 32 deletions bin/extract_filter_tutorials_test.sh

This file was deleted.

0 comments on commit 7c400f6

Please sign in to comment.