-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
11 changed files
with
414 additions
and
167 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,87 @@ | ||
name: Test Pull Request | ||
|
||
on: [push,pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8'] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- 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 }} | ||
- name: Install package | ||
run: pip install -r requirements.txt black==23.3 flake8==6.0 isort==5.12 | ||
- name: Flake8 | ||
run: flake8 --ignore=C901,W503 | ||
- name: Check import order | ||
uses: isort/isort-action@v1 | ||
with: | ||
isort-version: 5.12.0 | ||
configuration: --check --diff --profile black | ||
- name: Black | ||
uses: psf/[email protected] | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8'] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- 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 }} | ||
- name: install package | ||
run: python -m pip install . | ||
- name: install packages for testing | ||
run: pip install nose xmldiff | ||
- name: run nosetests | ||
run: nosetests --with-coverage --cover-package=galaxyxml | ||
|
||
- name: Run smoke test on example | ||
run: | | ||
python examples/example.py > tmp.xml | ||
xmldiff tmp.xml examples/tool.xml | ||
python examples/example_macros.py > tmp.xml | ||
xmldiff tmp.xml examples/example_macros.xml | ||
deploy: | ||
name: Deploy | ||
needs: [lint, test] | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.7'] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- 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 }} | ||
- uses: casperdcl/deploy-pypi@v2 | ||
with: | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
build: --sdist --wheel --outdir dist . | ||
# only upload if a tag is pushed (otherwise just build & check) | ||
upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }} |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.