Mercurial > repos > fubar > tool_factory_2
comparison toolfactory/.github/workflows/commit.yml @ 43:e7e9732ebed6 draft
Uploaded
author | fubar |
---|---|
date | Sun, 16 Aug 2020 08:51:14 -0400 |
parents | f8c1694190f0 |
children |
comparison
equal
deleted
inserted
replaced
42:b938475235e3 | 43:e7e9732ebed6 |
---|---|
1 name: Galaxy Tool Linting and Tests for PR | |
2 # run planemo on a git repository containing a single tool | |
3 # as a github action. Does NOT run flake8. So, bite me. | |
4 # ross lazarus august 2020 | |
5 on: [pull_request,push] | |
6 env: | |
7 GALAXY_REPO: https://github.com/galaxyproject/galaxy | |
8 GALAXY_RELEASE: release_20.05 | |
9 jobs: | |
10 setup: | |
11 name: setup environment and python | |
12 runs-on: ubuntu-latest | |
13 strategy: | |
14 matrix: | |
15 python-version: [3.7] | |
16 steps: | |
17 - name: Print github context properties | |
18 run: | | |
19 echo 'event: ${{ github.event_name }}' | |
20 echo 'sha: ${{ github.sha }}' | |
21 echo 'ref: ${{ github.ref }}' | |
22 echo 'head_ref: ${{ github.head_ref }}' | |
23 echo 'base_ref: ${{ github.base_ref }}' | |
24 echo 'event.before: ${{ github.event.before }}' | |
25 echo 'event.after: ${{ github.event.after }}' | |
26 - uses: actions/setup-python@v1 | |
27 with: | |
28 python-version: ${{ matrix.python-version }} | |
29 - uses: actions/checkout@v2 | |
30 with: | |
31 # planemo does not seem to want to install the requirement galaxyxml | |
32 # into the venv it manages at tool testing so do it the old skool way | |
33 repository: 'galaxyproject/galaxy' | |
34 path: 'galaxy' | |
35 - name: make venv ready for this galaxy and planemo | |
36 run: | | |
37 python3 -m venv $GITHUB_WORKSPACE/galaxy/.venv | |
38 . $GITHUB_WORKSPACE/galaxy/.venv/bin/activate | |
39 pip install --upgrade pip | |
40 pip install wheel | |
41 pip install -r $GITHUB_WORKSPACE/galaxy/requirements.txt | |
42 # pip install galaxyxml # currently includes a patched working version awaiting PR merge | |
43 - name: Upgrade pip | |
44 run: pip install --upgrade pip | |
45 # Install the `wheel` package so that when installing other packages which | |
46 # are not available as wheels, pip will build a wheel for them, which can be cached. | |
47 - name: Install wheel | |
48 run: pip install wheel | |
49 - name: Install Planemo and flake8 | |
50 run: pip install planemo flake8 flake8-import-order | |
51 # galaxyxml temporarily removed until PR accepted | |
52 - uses: actions/checkout@v2 | |
53 with: | |
54 fetch-depth: 1 | |
55 - name: flake8 | |
56 run: flake8 --ignore=E2,E3,E4,E5,W3,W505 | |
57 - name: Planemo lint | |
58 run: planemo lint . | |
59 - name: Planemo test tool | |
60 run: planemo test --galaxy_root $GITHUB_WORKSPACE/galaxy --test_output tool_test_output.html --skip_venv --test_output_json tool_test_output.json --galaxy_python_version ${{ matrix.python-version }} . | |
61 - name: Copy artifacts into place | |
62 run: | | |
63 mkdir upload | |
64 mv tool_test_output.json tool_test_output.html upload/ | |
65 - uses: actions/upload-artifact@v2.0.1 | |
66 with: | |
67 name: 'All tool test results' | |
68 path: upload |