Skip to content

Commit cc95a3d

Browse files
committed
re-add gh-actions
1 parent ff0a92d commit cc95a3d

4 files changed

Lines changed: 214 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Describe the bug
11+
A clear and concise description of what the bug is.
12+
13+
## To Reproduce
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
## Expected behavior
21+
A clear and concise description of what you expected to happen.
22+
23+
## Screenshots
24+
If applicable, add screenshots to help explain your problem.
25+
26+
## Desktop (please complete the following information):
27+
- OS: [e.g. macOS]
28+
- Browser [e.g. Chrome, Safari]
29+
- Version [e.g. 22]
30+
31+
## Smartphone (please complete the following information):
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS 8.1]
34+
- Browser [e.g. Stock browser, Safari]
35+
- Version [e.g. 22]
36+
37+
## Additional context
38+
Add any other context about the problem here.

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
updates:
3+
# Keep GitHub Actions up to date
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
labels:
9+
- "dependencies"
10+
11+
# Keep Python dependencies up to date
12+
- package-ecosystem: "pip"
13+
directory: "/"
14+
schedule:
15+
interval: "weekly"
16+
labels:
17+
- "dependencies"
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Publish and Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "1.20[2-9][0-9][0-9][0-9][0-9][0-9].[0-9]*"
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
build:
13+
name: Build distribution packages
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out repository
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
19+
- name: Set up Python 3.10
20+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
21+
with:
22+
python-version: "3.10"
23+
24+
- name: Install build dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install build hatchling
28+
29+
- name: Build sdist and wheel
30+
run: python -m build
31+
32+
- name: Upload built artifacts
33+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
34+
with:
35+
name: dist
36+
path: dist/
37+
38+
publish-to-pypi:
39+
name: Publish to PyPI
40+
needs: build
41+
runs-on: ubuntu-latest
42+
environment:
43+
name: pypi
44+
url: https://pypi.org/p/whoisdomain
45+
permissions:
46+
id-token: write
47+
steps:
48+
- name: Download built artifacts
49+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
50+
with:
51+
name: dist
52+
path: dist/
53+
54+
- name: Publish to PyPI
55+
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
56+
57+
create-github-release:
58+
name: Create GitHub release
59+
needs: build
60+
runs-on: ubuntu-latest
61+
permissions:
62+
contents: write
63+
steps:
64+
- name: Check out repository
65+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
66+
67+
- name: Download built artifacts
68+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
69+
with:
70+
name: dist
71+
path: dist/
72+
73+
- name: Create GitHub release
74+
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
75+
with:
76+
bodyFile: "README.md"
77+
artifacts: "dist/*"

.github/workflows/lint.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: "CI"
2+
on:
3+
push:
4+
branches: ["**"]
5+
pull_request:
6+
branches: ["**"]
7+
permissions:
8+
contents: read
9+
jobs:
10+
lint:
11+
name: Lint and type-check
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 10
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
18+
- name: Set up Python 3.10
19+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
20+
with:
21+
python-version: "3.10"
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install ruff tld types-redis types-requests python-dateutil whodap
27+
28+
- name: Run ruff lint
29+
run: ruff check whoisdomain/
30+
31+
test:
32+
name: Test on Python ${{ matrix.python-version }}
33+
runs-on: ubuntu-latest
34+
timeout-minutes: 10
35+
strategy:
36+
fail-fast: false
37+
matrix:
38+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
39+
steps:
40+
- name: Check out repository
41+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
42+
43+
- name: Set up Python ${{ matrix.python-version }}
44+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
48+
- name: Install package
49+
run: |
50+
python -m pip install --upgrade pip
51+
pip install tld whodap
52+
pip install .
53+
54+
- name: Smoke test
55+
run: python -c "import whoisdomain; print(whoisdomain.getVersion())"
56+
57+
build:
58+
name: Build distribution packages
59+
runs-on: ubuntu-latest
60+
timeout-minutes: 10
61+
steps:
62+
- name: Check out repository
63+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
64+
65+
- name: Set up Python 3.10
66+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
67+
with:
68+
python-version: "3.10"
69+
70+
- name: Install build dependencies
71+
run: |
72+
python -m pip install --upgrade pip
73+
pip install build hatchling
74+
75+
- name: Build sdist and wheel
76+
run: python -m build
77+
78+
- name: Upload built artifacts
79+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
80+
with:
81+
name: dist
82+
path: dist/

0 commit comments

Comments
 (0)