Skip to content

Commit c26f3d2

Browse files
committed
fix: adding actions on z3
1 parent a1db7bd commit c26f3d2

3 files changed

Lines changed: 125 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Conventional Commit Parser
2+
on:
3+
pull_request:
4+
branches: [main, master, develop]
5+
types: [opened, reopened, edited, review_requested, synchronize]
6+
7+
jobs:
8+
conventional_commit:
9+
name: Conventional Commits
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- uses: webiny/action-conventional-commits@v1.0.3

.github/workflows/main.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Python analisys
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
ruff:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up Python 3.10
11+
uses: actions/setup-python@v5
12+
with:
13+
python-version: "3.10"
14+
- name: Installing depencencies
15+
run: |
16+
python -m pip install --upgrade pip
17+
pip install setuptools
18+
pip install .
19+
- name: Installing Ruff linter
20+
run: |
21+
pip install ruff
22+
- name: Running Ruff linter
23+
run: |
24+
ruff check .
25+
mypy:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
- name: Set up Python 3.10
30+
uses: actions/setup-python@v4
31+
with:
32+
python-version: "3.10"
33+
- name: Install dependencies
34+
run: |
35+
python -m pip install --upgrade pip
36+
pip install mypy
37+
pip install .
38+
- name: Running static types with mypy
39+
run: |
40+
mypy -p flamapy
41+
pytest:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v2
45+
- name: Set up Python 3.10
46+
uses: actions/setup-python@v4
47+
with:
48+
python-version: "3.10"
49+
- name: Install dependencies
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install flamapy-fm
53+
pip install .
54+
pip install pytest==5.4.3
55+
- name: Running test
56+
run: |
57+
python -m pytest

.github/workflows/release.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Create Release and publish pypi package
2+
on:
3+
push:
4+
tags:
5+
- v[0-9]+.[0-9]+.*
6+
7+
jobs:
8+
released:
9+
name: Released
10+
if: github.ref_type == 'tag'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout git repo
14+
uses: actions/checkout@v2
15+
16+
- name: Automated Version Bump
17+
id: changelog
18+
uses: Requarks/changelog-action@v1
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
tag: ${{github.ref_name}}
22+
writeToFile: 'false'
23+
24+
- name: Get variables
25+
id: get_variables
26+
run: |
27+
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
28+
echo ::set-output name=IS_PRERELEASE::"${{contains(github.ref, 'dev')}}"
29+
30+
- name: Publish release github
31+
uses: softprops/action-gh-release@v1
32+
with:
33+
token: ${{ secrets.GITHUB_TOKEN }}
34+
prerelease: ${{ steps.get_variables.outputs.IS_PRERELEASE }}
35+
tag_name: ${{ steps.get_variables.outputs.VERSION }}
36+
body: ${{ steps.changelog.outputs.changes }}
37+
38+
- name: Set up Python
39+
uses: actions/setup-python@v4
40+
with:
41+
python-version: '3.10'
42+
43+
- name: Install dependencies
44+
run: |
45+
python -m pip install --upgrade pip
46+
pip install setuptools wheel twine
47+
48+
- name: Build and publish python package
49+
env:
50+
TWINE_USERNAME: __token__
51+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
52+
run: |
53+
python setup.py sdist bdist_wheel
54+
twine upload dist/*

0 commit comments

Comments
 (0)