Skip to content

Commit a3caefc

Browse files
committed
use reusable ci
1 parent c8e6132 commit a3caefc

File tree

1 file changed

+7
-90
lines changed

1 file changed

+7
-90
lines changed

.github/workflows/ci.yml

+7-90
Original file line numberDiff line numberDiff line change
@@ -17,93 +17,10 @@ permissions:
1717
id-token: write
1818

1919
jobs:
20-
test:
21-
name: Test / OS ${{ matrix.os }} / Python ${{ matrix.python-version }}
22-
strategy:
23-
matrix:
24-
os: [ubuntu-latest]
25-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
26-
runs-on: ${{ matrix.os }}
27-
steps:
28-
- name: Clone Repository
29-
uses: actions/checkout@v4
30-
31-
- name: Set up Python ${{ matrix.python-version }}
32-
uses: actions/setup-python@v5
33-
with:
34-
python-version: ${{ matrix.python-version }}
35-
36-
- name: Set up Poetry
37-
run: pipx install poetry==1.8.5 --python python${{ matrix.python-version }}
38-
39-
- name: Run Tests
40-
run: poetry run tests
41-
42-
- name: Upload coverage to Coveralls
43-
uses: coverallsapp/github-action@v2
44-
with:
45-
github-token: ${{ secrets.GITHUB_TOKEN }}
46-
flag-name: run-${{ join(matrix.*, '-') }}
47-
parallel: true
48-
49-
finish_tests:
50-
needs: test
51-
name: Upload tests coveralls results
52-
if: ${{ always() }}
53-
runs-on: ubuntu-latest
54-
steps:
55-
- name: Coveralls Finished
56-
uses: coverallsapp/github-action@v2
57-
with:
58-
github-token: ${{ secrets.GITHUB_TOKEN }}
59-
parallel-finished: true
60-
carryforward: "run-ubuntu-latest-3.9,run-ubuntu-latest-3.10,run-ubuntu-latest-3.11,run-ubuntu-latest-3.12,run-ubuntu-latest-3.13"
61-
62-
release-please:
63-
needs: test
64-
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'supabase' }}
65-
runs-on: ubuntu-latest
66-
name: "Bump version and create changelog"
67-
permissions:
68-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
69-
contents: write # needed for github actions bot to write to repo
70-
pull-requests: write
71-
steps:
72-
- uses: googleapis/release-please-action@v4
73-
id: release
74-
with:
75-
target-branch: ${{ github.ref_name }}
76-
publish:
77-
needs: release-please
78-
if: ${{ startsWith(github.event.head_commit.message, 'chore(main)') && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'supabase' }}
79-
runs-on: ubuntu-latest
80-
name: "Publish to PyPi"
81-
environment:
82-
name: pypi
83-
url: https://pypi.org/p/supabase
84-
permissions:
85-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
86-
contents: write # needed for github actions bot to write to repo
87-
steps:
88-
- name: Set up Python 3.11
89-
uses: actions/setup-python@v5
90-
with:
91-
python-version: 3.11
92-
93-
- name: Clone Repository
94-
uses: actions/checkout@v4
95-
with:
96-
ref: ${{ github.ref }}
97-
fetch-depth: 0
98-
99-
- name: Set up Poetry
100-
run: pipx install poetry==1.8.5 --python python3.11
101-
102-
- name: Install dependencies
103-
run: poetry install
104-
105-
- name: Build package dist directory
106-
run: poetry build
107-
108-
- name: Publish package distributions to PyPI
109-
uses: pypa/gh-action-pypi-publish@release/v1
20+
ci:
21+
uses: supabase/actions/.github/workflows/python/ci.yml@guilherme/python-ci
22+
with:
23+
enable-publish: true
24+
package-name: 'supabase'
25+
secrets:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)