Skip to content

Commit ff102e4

Browse files
authored
Merge pull request #16 from FuzzFoundation/bug/fix-github-actions-into-main
Fix building and publishing github actions
2 parents abc0ae7 + 90c4e72 commit ff102e4

File tree

4 files changed

+67
-65
lines changed

4 files changed

+67
-65
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build & Publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python 3.9
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: 3.9
16+
- name: Create virtual environment
17+
run: make init
18+
- name: Build module
19+
run: make build
20+
- uses: actions/upload-artifact@v2
21+
with:
22+
name: wktplot_dist
23+
path: dist/
24+
25+
publish:
26+
needs: build
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/download-artifact@v2
30+
with:
31+
name: wktplot_dist
32+
path: dist
33+
- name: Publish package
34+
uses: pypa/gh-action-pypi-publish@v1.5.0
35+
with:
36+
user: __token__
37+
password: ${{ secrets.PYPI_API_TOKEN }}
38+
print_hash: true

.github/workflows/unittest.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: unittest
2+
3+
on:
4+
- pull_request
5+
6+
jobs:
7+
test:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, windows-latest]
12+
python-version: ['3.7', '3.8', '3.9']
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Create virtual environment and install dependencies
20+
run: make develop
21+
- name: Run tests
22+
run: make test
23+
- name: Upload coverage to Codecov
24+
uses: codecov/codecov-action@v2
25+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' && github.ref == 'refs/heads/main'
26+
- name: Codacy Analysis CLI
27+
uses: codacy/codacy-analysis-cli-action@4.0.0
28+
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' && github.ref == 'refs/heads/main'

.github/workflows/wktplot.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

src/wktplot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
from .wktplot import WKTPlot # noqa: F401
22

3-
__version__ = "2.0.0"
3+
__version__ = "2.0.dev0"

0 commit comments

Comments
 (0)