Skip to content

Commit

Permalink
tests: misc tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Nov 17, 2020
1 parent e20d873 commit 8788ad2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,16 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: pip install -U tox
- name: install
shell: bash
run: |
pip install -U tox
mkdir -p "$HOME/bin"
curl -sfL https://coverage.codacy.com/get.sh > "$HOME/bin/codacy"
chmod +x "$HOME/bin/codacy"
echo "$HOME/bin" >> $GITHUB_PATH
- run: tox -e py${PYVER/./}
shell: bash
env:
PYVER: ${{ matrix.python }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -49,7 +57,13 @@ jobs:
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- run: pip install -U tox
- name: install
run: |
pip install -U tox
mkdir -p "$HOME/bin"
curl -sfL https://coverage.codacy.com/get.sh > "$HOME/bin/codacy"
chmod +x "$HOME/bin/codacy"
echo "$HOME/bin" >> $GITHUB_PATH
- name: tox
run: |
if [[ "$PYVER" == py* ]]; then
Expand Down Expand Up @@ -104,7 +118,6 @@ jobs:
skip_existing: true
- id: collect_assets
name: Collect assets
shell: bash
run: |
echo "::set-output name=asset_path::$(ls dist/*.whl)"
echo "::set-output name=asset_name::$(basename dist/*.whl)"
Expand Down Expand Up @@ -154,7 +167,6 @@ jobs:
with:
use_lxd: true
- name: Snap build
shell: bash
run: |
export SNAPCRAFT_IMAGE_INFO='{"build_url": "https://github.com/tqdm/tqdm/actions/runs/'$GITHUB_RUN_ID'"}'
sg lxd -c 'snapcraft --use-lxd'
Expand All @@ -168,7 +180,6 @@ jobs:
snapcraft_token: ${{ secrets.SNAP_TOKEN }}
- if: github.event_name == 'push' && steps.collect_assets.outputs.snap_channel
name: Snap deploy
shell: bash
run: |
if [ -n "$(ls tqdm*.snap 2>/dev/null)" ]; then
sudo snapcraft upload tqdm*.snap --release $CHANNEL
Expand Down
13 changes: 4 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ deps =
commands =
pytest --cov=tqdm --cov-report=xml --cov-report=term -k "not tests_perf"
- coveralls
- curl -OL https://coverage.codacy.com/get.sh
- bash get.sh report -r coverage.xml
allowlist_externals =
curl
bash
- codacy report -r coverage.xml
allowlist_externals = codacy

[extra]
deps =
Expand All @@ -31,8 +28,7 @@ commands =
pytest --durations=10 --cov=tqdm --cov-report=xml --cov-report=term -k "not tests_perf"
- coveralls
codecov
- curl -OL https://coverage.codacy.com/get.sh
- bash get.sh report -r coverage.xml
- codacy report -r coverage.xml
allowlist_externals = {[coverage]allowlist_externals}

[testenv]
Expand Down Expand Up @@ -65,8 +61,7 @@ commands = pytest --durations=0 -k tests_perf

[testenv:flake8]
deps = flake8
commands =
flake8 -j 8 --count --statistics .
commands = flake8 -j 8 --count --statistics .

[testenv:setup.py]
deps =
Expand Down

0 comments on commit 8788ad2

Please sign in to comment.