Skip to content

Commit 63a782b

Browse files
committed
initial commit
0 parents  commit 63a782b

File tree

11 files changed

+1213
-0
lines changed

11 files changed

+1213
-0
lines changed

.github/workflows/main.yml

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
name: Workflow for Push on Main Branch
2+
3+
on:
4+
push:
5+
tags:
6+
- '**'
7+
8+
jobs:
9+
pytest:
10+
name: Run tests
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
python-version: ["3.11", "3.12"]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install dependecies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install poetry pytest
29+
poetry config virtualenvs.create false --local
30+
poetry config virtualenvs.in-project false --local
31+
poetry install
32+
33+
- name: Run tests
34+
run: |
35+
poetry run pytest
36+
37+
pytype:
38+
name: Static type checking
39+
runs-on: ubuntu-latest
40+
41+
strategy:
42+
matrix:
43+
python-version: ["3.11"]
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Set up Python ${{ matrix.python-version }}
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: ${{ matrix.python-version }}
52+
53+
- name: Install dependecies
54+
run: |
55+
python -m pip install --upgrade pip
56+
pip install poetry pytype
57+
poetry config virtualenvs.create false --local
58+
poetry config virtualenvs.in-project false --local
59+
poetry install
60+
61+
- name: Run type checking
62+
run: |
63+
poetry run pytype -V ${{ matrix.python-version }}
64+
65+
pylint:
66+
name: Lint code
67+
runs-on: ubuntu-latest
68+
69+
strategy:
70+
matrix:
71+
python-version: ["3.11", "3.12"]
72+
73+
steps:
74+
- uses: actions/checkout@v4
75+
76+
- name: Set up Python ${{ matrix.python-version }}
77+
uses: actions/setup-python@v5
78+
with:
79+
python-version: ${{ matrix.python-version }}
80+
81+
- name: Install dependecies
82+
run: |
83+
python -m pip install --upgrade pip
84+
pip install poetry pylint
85+
poetry config virtualenvs.create false --local
86+
poetry config virtualenvs.in-project false --local
87+
poetry install
88+
89+
- name: Run linting
90+
run: |
91+
poetry run pylint src/tracing
92+
93+
build:
94+
name: Build package
95+
needs: [pytest, pytype, pylint]
96+
97+
runs-on: ubuntu-latest
98+
99+
strategy:
100+
matrix:
101+
python-version: ["3.11"]
102+
103+
steps:
104+
- uses: actions/checkout@v4
105+
106+
- name: Set up Python ${{ matrix.python-version }}
107+
uses: actions/setup-python@v5
108+
with:
109+
python-version: ${{ matrix.python-version }}
110+
111+
- name: Install dependecies
112+
run: |
113+
python -m pip install --upgrade pip
114+
pip install poetry
115+
poetry config virtualenvs.create false --local
116+
poetry config virtualenvs.in-project false --local
117+
poetry install
118+
119+
- name: Build package
120+
run: |
121+
poetry build
122+
123+
- name: Upload package
124+
uses: actions/upload-artifact@v3
125+
with:
126+
name: py_tracing-latest-py3
127+
path: dist/*
128+
129+
update-documentation:
130+
name: Update documentation
131+
needs: build
132+
runs-on: ubuntu-latest
133+
134+
steps:
135+
- uses: actions/checkout@v4
136+
137+
- name: Set up Python 3.11
138+
uses: actions/setup-python@v5
139+
with:
140+
python-version: 3.11
141+
142+
- name: Install dependecies
143+
run: |
144+
python -m pip install --upgrade pip
145+
pip install make poetry
146+
poetry config virtualenvs.create false --local
147+
poetry config virtualenvs.in-project false --local
148+
poetry install
149+
150+
- name: Build documentation
151+
run: |
152+
cd docs && make html
153+
154+
- name: Deploy to GitHub Pages
155+
uses: peaceiris/actions-gh-pages@v3
156+
with:
157+
publish_branch: gh-pages
158+
github_token: ${{ secrets.TOKEN }}
159+
publish_dir: docs/build/html
160+
force_orphan: true
161+
162+
publish-to-pypi:
163+
name: Publish to PyPI
164+
needs: build
165+
runs-on: ubuntu-latest
166+
environment: release
167+
168+
permissions:
169+
id-token: write
170+
171+
steps:
172+
- name: Download all the dists
173+
uses: actions/download-artifact@v3
174+
with:
175+
name: py_tracing-latest-py3
176+
path: dist
177+
178+
- name: Publish distribution to PyPI
179+
uses: pypa/gh-action-pypi-publish@release/v1
180+
with:
181+
skip-existing: true
182+

.github/workflows/pull.yml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
name: On pull request
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
pytest:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
matrix:
11+
python-version: ["3.11", "3.12"]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
21+
- name: Install dependecies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install poetry pytest
25+
poetry config virtualenvs.create false --local
26+
poetry config virtualenvs.in-project false --local
27+
poetry install
28+
29+
- name: Run tests
30+
run: |
31+
poetry run pytest
32+
33+
pytype:
34+
runs-on: ubuntu-latest
35+
36+
strategy:
37+
matrix:
38+
python-version: ["3.11"]
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Set up Python ${{ matrix.python-version }}
44+
uses: actions/setup-python@v5
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
48+
- name: Install dependecies
49+
run: |
50+
python -m pip install --upgrade pip
51+
pip install poetry pytype
52+
poetry config virtualenvs.create false --local
53+
poetry config virtualenvs.in-project false --local
54+
poetry install
55+
56+
- name: Run type checking
57+
run: |
58+
poetry run pytype -V ${{ matrix.python-version }}
59+
60+
pylint:
61+
runs-on: ubuntu-latest
62+
63+
strategy:
64+
matrix:
65+
python-version: ["3.11", "3.12"]
66+
67+
steps:
68+
- uses: actions/checkout@v4
69+
70+
- name: Set up Python ${{ matrix.python-version }}
71+
uses: actions/setup-python@v5
72+
with:
73+
python-version: ${{ matrix.python-version }}
74+
75+
- name: Install dependecies
76+
run: |
77+
python -m pip install --upgrade pip
78+
pip install poetry pylint
79+
poetry config virtualenvs.create false --local
80+
poetry config virtualenvs.in-project false --local
81+
poetry install
82+
83+
- name: Run linting
84+
run: |
85+
poetry run pylint src/tracing
86+
87+
build:
88+
needs: [pytest, pytype, pylint]
89+
90+
runs-on: ubuntu-latest
91+
92+
strategy:
93+
matrix:
94+
python-version: ["3.11"]
95+
96+
steps:
97+
- uses: actions/checkout@v4
98+
99+
- name: Set up Python ${{ matrix.python-version }}
100+
uses: actions/setup-python@v5
101+
with:
102+
python-version: ${{ matrix.python-version }}
103+
104+
- name: Install dependecies
105+
run: |
106+
python -m pip install --upgrade pip
107+
pip install poetry
108+
poetry config virtualenvs.create false --local
109+
poetry config virtualenvs.in-project false --local
110+
poetry install
111+
112+
- name: Build package
113+
run: |
114+
poetry build

0 commit comments

Comments
 (0)