Skip to content

Commit 14c8db9

Browse files
committed
Add github workflow
1 parent 575da96 commit 14c8db9

File tree

4 files changed

+130
-0
lines changed

4 files changed

+130
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @olirice @J0 @silentworks

.github/ISSUE_TEMPLATE/bug_report.md

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. iOS]
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. iOS8.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.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/ci.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
test:
12+
name: Test / OS ${{ matrix.os }} / Python ${{ matrix.python-version }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
python-version: ["3.8", "3.9", "3.10", "3.11"]
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- name: Clone Repository
20+
uses: actions/checkout@v2
21+
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
27+
- name: Set up Poetry
28+
uses: abatilo/[email protected]
29+
with:
30+
poetry-version: 1.3.2
31+
32+
- name: Run Tests
33+
run: make run_tests
34+
35+
- name: Upload Coverage
36+
uses: codecov/codecov-action@v3
37+
publish:
38+
needs: test
39+
if: ${{ !startsWith(github.event.head_commit.message, 'bump') && !startsWith(github.event.head_commit.message, 'chore') && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'supabase-community' }}
40+
runs-on: ubuntu-latest
41+
name: "Bump version, create changelog and publish"
42+
environment:
43+
name: pypi
44+
url: https://pypi.org/p/supafunc
45+
permissions:
46+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
47+
contents: write # needed for github actions bot to write to repo
48+
steps:
49+
- name: Clone Repository
50+
uses: actions/checkout@v3
51+
with:
52+
ref: ${{ github.ref }}
53+
fetch-depth: 0
54+
token: ${{ secrets.SILENTWORKS_PAT }}
55+
- name: Python Semantic Release
56+
id: release
57+
uses: python-semantic-release/[email protected]
58+
with:
59+
github_token: ${{ secrets.GITHUB_TOKEN }}
60+
61+
- name: Publish package distributions to PyPI
62+
uses: pypa/gh-action-pypi-publish@release/v1
63+
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
64+
# See https://github.com/actions/runner/issues/1173
65+
if: steps.release.outputs.released == 'true'
66+
67+
- name: Publish package distributions to GitHub Releases
68+
uses: python-semantic-release/upload-to-gh-release@main
69+
if: steps.release.outputs.released == 'true'
70+
with:
71+
github_token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)