Skip to content

Commit b1bd4ff

Browse files
committed
✨ browsr
0 parents  commit b1bd4ff

30 files changed

+15367
-0
lines changed

.github/semantic_release/package-lock.json

Lines changed: 12494 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"devDependencies": {
3+
"@semantic-release/exec": "^6.0.3",
4+
"@semantic-release/git": "^10.0.1",
5+
"@semantic-release/github": "^8.0.7",
6+
"semantic-release": "^21.0.1",
7+
"semantic-release-gitmoji": "^1.6.4"
8+
}
9+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{{#if compareUrl}}
2+
# [v{{nextRelease.version}}]({{compareUrl}}) ({{datetime "UTC:yyyy-mm-dd"}})
3+
{{else}}
4+
# v{{nextRelease.version}} ({{datetime "UTC:yyyy-mm-dd"}})
5+
{{/if}}
6+
7+
{{#with commits}}
8+
9+
{{#if boom}}
10+
## 💥 Breaking Changes
11+
{{#each boom}}
12+
- {{> commitTemplate}}
13+
{{/each}}
14+
{{/if}}
15+
16+
{{#if sparkles}}
17+
## ✨ New Features
18+
{{#each sparkles}}
19+
- {{> commitTemplate}}
20+
{{/each}}
21+
{{/if}}
22+
23+
{{#if bug}}
24+
## 🐛 Bug Fixes
25+
{{#each bug}}
26+
- {{> commitTemplate}}
27+
{{/each}}
28+
{{/if}}
29+
30+
{{#if ambulance}}
31+
## 🚑 Critical Hotfixes
32+
{{#each ambulance}}
33+
- {{> commitTemplate}}
34+
{{/each}}
35+
{{/if}}
36+
37+
{{#if lock}}
38+
## 🔒 Security Issues
39+
{{#each lock}}
40+
- {{> commitTemplate}}
41+
{{/each}}
42+
{{/if}}
43+
44+
{{#if arrow_up}}
45+
## ⬆️ Dependency Upgrade
46+
{{#each arrow_up}}
47+
- {{> commitTemplate}}
48+
{{/each}}
49+
{{/if}}
50+
51+
{{#if memo}}
52+
## 📝️ Documentation
53+
{{#each memo}}
54+
- {{> commitTemplate}}
55+
{{/each}}
56+
{{/if}}
57+
58+
{{#if construction_worker}}
59+
## 👷 CI/CD
60+
{{#each construction_worker}}
61+
- {{> commitTemplate}}
62+
{{/each}}
63+
{{/if}}
64+
65+
{{#if white_check_mark}}
66+
## 🧪️ Add / Update / Pass Tests
67+
{{#each white_check_mark}}
68+
- {{> commitTemplate}}
69+
{{/each}}
70+
{{/if}}
71+
72+
{{#if test_tube}}
73+
## 🧪️ Add Failing Tests
74+
{{#each test_tube}}
75+
- {{> commitTemplate}}
76+
{{/each}}
77+
{{/if}}
78+
79+
{{#if recycle}}
80+
## ♻️Refactoring
81+
{{#each recycle}}
82+
- {{> commitTemplate}}
83+
{{/each}}
84+
{{/if}}
85+
86+
{{#if truck}}
87+
## 🚚 Moving/Renaming
88+
{{#each truck}}
89+
- {{> commitTemplate}}
90+
{{/each}}
91+
{{/if}}
92+
93+
{{/with}}

.github/workflows/lint.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
branches: ["**"]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Set up Github Workspace
12+
uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
- name: Set up Python Environment 3.10
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: "3.10"
19+
- name: Install Hatch
20+
run: |
21+
python -m pip install --upgrade pip
22+
python -m pip install -q hatch
23+
hatch env create
24+
hatch --version
25+
- name: Lint
26+
id: lint
27+
continue-on-error: true
28+
run: |
29+
echo "::add-matcher::.github/workflows/matchers/flake8.json"
30+
hatch run lint
31+
echo "::remove-matcher owner=flake8::"
32+
- name: Code Checker
33+
id: check
34+
continue-on-error: true
35+
run: |
36+
echo "::add-matcher::.github/workflows/matchers/mypy.json"
37+
hatch run check
38+
echo "::remove-matcher owner=mypy::"
39+
- name: Raise Errors For Linting Failures
40+
if: |
41+
steps.lint.outcome != 'success' ||
42+
steps.check.outcome != 'success'
43+
run: |
44+
echo "Lint: ${{ steps.lint.outcome }}"
45+
echo "Check: ${{ steps.check.outcome }}"
46+
exit 1
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "flake8",
5+
"pattern": [
6+
{
7+
"regexp": "^(.*?):(\\d+):(\\d+): (.*)$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"message": 4
12+
}
13+
]
14+
}
15+
]
16+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "mypy",
5+
"pattern": [
6+
{
7+
"regexp": "^(.+):(\\d+):\\s(error|warning|note):\\s(.+)$",
8+
"file": 1,
9+
"line": 2,
10+
"severity": 3,
11+
"message": 4
12+
}
13+
]
14+
}
15+
]
16+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "python",
5+
"pattern": [
6+
{
7+
"regexp": "^\\s*File\\s\\\"(.*)\\\",\\sline\\s(\\d+),\\sin\\s(.*)$",
8+
"file": 1,
9+
"line": 2
10+
},
11+
{
12+
"regexp": "^\\s*raise\\s(.*)\\(\\'(.*)\\'\\)$",
13+
"message": 2
14+
}
15+
]
16+
}
17+
]
18+
}

.github/workflows/publish.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publishing
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
pypi-publish:
10+
name: PyPI
11+
if: github.repository_owner == 'juftin'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out the repository
15+
uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 2
18+
- name: Set up Python
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: "3.10"
22+
- name: Install Hatch
23+
run: |
24+
python -m pip install --upgrade pip
25+
python -m pip install -q hatch
26+
hatch env create
27+
hatch --version
28+
- name: Build package
29+
run: |
30+
hatch build
31+
- name: Publish package on PyPI
32+
uses: pypa/gh-action-pypi-publish@v1.6.4
33+
with:
34+
user: __token__
35+
password: ${{ secrets.PYPI_TOKEN }}

.github/workflows/release.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release
2+
on:
3+
push:
4+
branches: [main, next, beta, alpha, "*.x"]
5+
jobs:
6+
release:
7+
name: Release
8+
if: github.repository_owner == 'juftin'
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
issues: write
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
with:
17+
persist-credentials: false
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v3
20+
- name: Set up Python
21+
uses: actions/setup-python@v4
22+
with:
23+
python-version: "3.10"
24+
- name: Install Hatch
25+
run: |
26+
python -m pip install --upgrade pip
27+
python -m pip install -q hatch
28+
hatch env create
29+
hatch --version
30+
- name: Release
31+
run: hatch run semantic-release
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
34+
GIT_AUTHOR_NAME: github-actions[bot]
35+
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
36+
GIT_COMMITTER_NAME: github-actions[bot]
37+
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
38+
39+
github-pages-publish:
40+
runs-on: ubuntu-latest
41+
needs: release
42+
if: github.ref == 'refs/heads/main' && github.repository_owner == 'juftin'
43+
permissions:
44+
contents: write
45+
steps:
46+
- name: Checkout Latest Changes
47+
uses: actions/checkout@v3
48+
with:
49+
ref: ${{ github.ref }}
50+
fetch-depth: 0
51+
- name: Set up Python Environment
52+
uses: actions/setup-python@v4
53+
with:
54+
python-version: "3.10"
55+
- name: Install Hatch
56+
run: |
57+
python -m pip install --upgrade pip
58+
python -m pip install -q hatch
59+
hatch env create
60+
hatch --version
61+
- name: Set Up GitHub Actions User
62+
run: |
63+
git config user.name "github-actions[bot]"
64+
git config user.email "github-actions[bot]@users.noreply.github.com"
65+
- name: Deploy Documentation Changes
66+
run: hatch run docs-deploy --force

.github/workflows/tests.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- browsr/**
9+
- pyproject.toml
10+
- .github/workflows/tests.yaml
11+
pull_request:
12+
branches: ["**"]
13+
paths:
14+
- browsr/**
15+
- pyproject.toml
16+
- .github/workflows/tests.yaml
17+
schedule:
18+
- cron: 0 12 1 * *
19+
jobs:
20+
test-suite:
21+
runs-on: ubuntu-latest
22+
strategy:
23+
fail-fast: true
24+
matrix:
25+
include:
26+
- { name: Python 3.11, python: "3.11" }
27+
- { name: Python 3.10, python: "3.10" }
28+
- { name: Python 3.9, python: "3.9" }
29+
- { name: Python 3.8, python: "3.8" }
30+
steps:
31+
- name: Set up Github Workspace
32+
uses: actions/checkout@v3
33+
with:
34+
fetch-depth: 0
35+
- name: Set up Python Environment ${{ matrix.python }}
36+
uses: actions/setup-python@v4
37+
with:
38+
python-version: ${{ matrix.python }}
39+
- name: Install Hatch
40+
run: |
41+
python -m pip install --upgrade pip
42+
python -m pip install -q hatch
43+
hatch env create
44+
hatch --version
45+
- name: Test Suite
46+
run: |
47+
echo "::add-matcher::.github/workflows/matchers/python.json"
48+
hatch run test
49+
echo "::remove-matcher owner=python::"

0 commit comments

Comments
 (0)