From c1f211de16942857cc86a58c194d22459ed816e8 Mon Sep 17 00:00:00 2001 From: Artur Barseghyan Date: Tue, 22 Jun 2021 22:48:54 +0200 Subject: [PATCH] GitHub actions (#19) * Conf coveralls --- .coveragerc | 1 + .coverals.yml => .coveralls.yml | 0 .env | 2 ++ .github/workflows/test.yml | 39 ++++++++++++++------------------- scripts/make_release.sh | 3 ++- 5 files changed, 22 insertions(+), 23 deletions(-) rename .coverals.yml => .coveralls.yml (100%) create mode 100644 .env diff --git a/.coveragerc b/.coveragerc index f1cc71f..084052c 100644 --- a/.coveragerc +++ b/.coveragerc @@ -7,6 +7,7 @@ omit = example/example/settings/* example/example/wsgi.py .tox/* +relative_files = True [report] exclude_lines = diff --git a/.coverals.yml b/.coveralls.yml similarity index 100% rename from .coverals.yml rename to .coveralls.yml diff --git a/.env b/.env new file mode 100644 index 0000000..79cde8e --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +GITHUB_TOKEN +COVERALLS_REPO_TOKEN diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e940910..869d3d2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -78,26 +78,21 @@ jobs: pip install -r examples/requirements/test.txt - name: Run Tests run: tox -e ${{ matrix.tox_env }} + - name: Coveralls + uses: AndreMiras/coveralls-python-action@develop + with: + parallel: true + flag-name: Run Tests -# finish: -# needs: test -# runs-on: ubuntu-latest -# steps: -# - name: Coveralls Finished -# env: -# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} -# GITHUB_TOKEN: $COVERALLS_REPO_TOKEN -# run: | -# sudo apt-get install git -y -# pip install coveralls -# coveralls -v --service=github-actions - -# finish: -# needs: test -# runs-on: ubuntu-latest -# steps: -# - name: Coveralls Finished -# uses: coverallsapp/github-action@master -# with: -# github-token: ${{ secrets.COVERALLS_GITHUB_TOKEN }} -# parallel-finished: true + coveralls_finish: + needs: test + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + env: + COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + GITHUB_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} + uses: AndreMiras/coveralls-python-action@develop + with: + parallel-finished: true + debug: True diff --git a/scripts/make_release.sh b/scripts/make_release.sh index 84a2a83..ed5f46f 100755 --- a/scripts/make_release.sh +++ b/scripts/make_release.sh @@ -1,3 +1,4 @@ #!/usr/bin/env bash python setup.py register -python setup.py sdist bdist_wheel upload +python setup.py sdist bdist_wheel +twine upload dist/* --verbose