-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
57 additions
and
74 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Test, release and publish | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9"] | ||
steps: | ||
- run: echo "Current ref ${{ github.ref }}" | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip tox-gh | ||
python -m pip install -e .[test] | ||
install_antlrjar | ||
- name: Test with coverage/unittest | ||
run: | | ||
export ANTLR4_JAR="/home/runner/work/liblet/liblet/jars/antlr-4.9.3-complete.jar" && tox4 | ||
- name: Publish to Coveralls | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body_path: CHANGELOG.txt | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: startsWith(github.ref, 'refs/tags/') | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install pypa/build | ||
run: python -m pip install build | ||
- name: Build the binary wheel and source tarball | ||
run: python -m build | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file was deleted.
Oops, something went wrong.