Skip to content

Commit 59b8827

Browse files
authored
ci: Replace releaser with release please (#231)
1 parent 7629de9 commit 59b8827

File tree

15 files changed

+291
-268
lines changed

15 files changed

+291
-268
lines changed

.circleci/config.yml

Lines changed: 0 additions & 196 deletions
This file was deleted.

.github/actions/publish/action.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish Package
2+
description: 'Publish the package to PyPI'
3+
inputs:
4+
token:
5+
description: 'Token to use for publishing.'
6+
required: true
7+
dry_run:
8+
description: 'Is this a dry run. If so no package will be published.'
9+
required: true
10+
11+
runs:
12+
using: composite
13+
steps:
14+
- name: Set up Python 3.11
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: 3.11
18+
19+
- name: Install dependencies
20+
shell: bash
21+
run: |
22+
pip install -r requirements.txt
23+
pip install wheel
24+
25+
- name: Building publishable packages
26+
shell: bash
27+
run: python setup.py sdist bdist_wheel
28+
29+
- name: Publish package distributions to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1
31+
if: ${{ inputs.dry_run == 'false' }}
32+
with:
33+
password: ${{inputs.token}}

.github/workflows/ci.yml

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
name: Quality control checks
2+
3+
on:
4+
push:
5+
branches: [ 8.x ]
6+
paths-ignore:
7+
- '**.md' # Do not need to run CI for markdown changes.
8+
pull_request:
9+
branches: [ 8.x ]
10+
paths-ignore:
11+
- '**.md'
12+
13+
jobs:
14+
linux:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
20+
21+
services:
22+
redis:
23+
image: redis
24+
ports:
25+
- 6379:6379
26+
dynamodb:
27+
image: amazon/dynamodb-local
28+
ports:
29+
- 8000:8000
30+
consul:
31+
image: hashicorp/consul
32+
ports:
33+
- 8500:8500
34+
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Set up Python ${{ matrix.python-version }}
38+
uses: actions/setup-python@v4
39+
with:
40+
python-version: ${{ matrix.python-version }}
41+
42+
- name: Install requirements
43+
run: |
44+
pipx install virtualenv
45+
pip install -r test-requirements.txt
46+
pip install -r test-filesource-optional-requirements.txt
47+
pip install -r consul-requirements.txt
48+
python setup.py install
49+
pip freeze
50+
51+
- name: Run tests
52+
run: pytest -s testing -W error::SyntaxWarning
53+
54+
- name: Test packaging
55+
run: |
56+
sudo rm -rf dist *.egg-info
57+
./test-packaging/test-packaging.sh
58+
59+
- name: Verify typehints
60+
run: make lint
61+
62+
- name: Verify docs can be successfully built
63+
run: make docs
64+
65+
- name: build SSE contract test service
66+
if: ${{ matrix.python-version != 3.7 }}
67+
run: |
68+
cd sse-contract-tests
69+
make build-test-service
70+
71+
- name: start SSE contract test service
72+
if: ${{ matrix.python-version != 3.7 }}
73+
run: |
74+
cd sse-contract-tests
75+
make start-test-service &
76+
77+
- name: run SSE contract tests
78+
if: ${{ matrix.python-version != 3.7 }}
79+
run: |
80+
cd sse-contract-tests
81+
make run-contract-tests
82+
83+
- name: Build contract tests
84+
if: ${{ matrix.python-version != 3.7 }}
85+
run: make build-contract-tests
86+
87+
- name: Start contract test service
88+
if: ${{ matrix.python-version != 3.7 }}
89+
run: make start-contract-test-service &
90+
91+
- name: run contract tests
92+
if: ${{ matrix.python-version != 3.7 }}
93+
run: make run-contract-tests
94+
95+
windows:
96+
runs-on: windows-latest
97+
98+
defaults:
99+
run:
100+
shell: powershell
101+
102+
strategy:
103+
matrix:
104+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
105+
106+
steps:
107+
- uses: actions/checkout@v4
108+
- name: Set up Python ${{ matrix.python-version }}
109+
uses: actions/setup-python@v4
110+
with:
111+
python-version: ${{ matrix.python-version }}
112+
113+
- name: Setup DynamoDB
114+
run: |
115+
$ProgressPreference = "SilentlyContinue"
116+
iwr -outf dynamo.zip https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip
117+
mkdir dynamo
118+
Expand-Archive -Path dynamo.zip -DestinationPath dynamo
119+
cd dynamo
120+
cmd /c "START /b java -Djava.library.path=./DynamoDBLocal_lib -jar ./DynamoDBLocal.jar"
121+
122+
- name: Setup Consul
123+
run: |
124+
$ProgressPreference = "SilentlyContinue"
125+
iwr -outf consul.zip https://releases.hashicorp.com/consul/1.4.2/consul_1.4.2_windows_amd64.zip
126+
mkdir consul
127+
Expand-Archive -Path consul.zip -DestinationPath consul
128+
cd consul
129+
sc.exe create "Consul" binPath="$(Get-Location)/consul.exe agent -dev"
130+
sc.exe start "Consul"
131+
132+
- name: Setup Redis
133+
run: |
134+
$ProgressPreference = "SilentlyContinue"
135+
iwr -outf redis.zip https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip
136+
mkdir redis
137+
Expand-Archive -Path redis.zip -DestinationPath redis
138+
cd redis
139+
./redis-server --service-install
140+
./redis-server --service-start
141+
Start-Sleep -s 5
142+
./redis-cli ping
143+
144+
- name: Install requirements
145+
run: |
146+
pip install -r test-requirements.txt
147+
pip install -r test-filesource-optional-requirements.txt
148+
pip install -r consul-requirements.txt
149+
python setup.py install
150+
pip freeze
151+
152+
- name: Run tests
153+
run: pytest -s testing -W error::SyntaxWarning
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Lint PR title
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
lint-pr-title:
12+
uses: launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main

0 commit comments

Comments
 (0)