-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4ef6dbf
commit 81e30d7
Showing
3 changed files
with
150 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Release to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: check GITHUB_REF matches package version | ||
uses: samuelcolvin/[email protected] | ||
with: | ||
version_file_path: centrifuge/__meta__.py | ||
|
||
- name: Install build dependencies | ||
run: pip install build | ||
|
||
- name: Build distribution | ||
run: python -m build | ||
|
||
- name: Publish package to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Test | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
build: | ||
# Prevent duplicate builds on internal PRs. | ||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
python-version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup docker | ||
if: matrix.os == 'macos-latest' | ||
uses: crazy-max/ghaction-setup-docker@v3 | ||
|
||
- name: Start Centrifugo | ||
run: docker run -d -p 8000:8000 -e CENTRIFUGO_API_KEY=api_key -e CENTRIFUGO_HISTORY_TTL=300s -e CENTRIFUGO_HISTORY_SIZE=100 -e CENTRIFUGO_PRESENCE=true -e CENTRIFUGO_GRPC_API=true centrifugo/centrifugo:v5 centrifugo | ||
|
||
- name: Install dependencies | ||
run: | | ||
make dev | ||
- name: Run tests | ||
run: | | ||
make test | ||
- name: Run linter | ||
run: | | ||
make lint-ci |
Oops, something went wrong.