Skip to content

Commit

Permalink
ci: Replace releaser with release please (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 committed Nov 21, 2023
1 parent 7629de9 commit 59b8827
Show file tree
Hide file tree
Showing 15 changed files with 291 additions and 268 deletions.
196 changes: 0 additions & 196 deletions .circleci/config.yml

This file was deleted.

33 changes: 33 additions & 0 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Package
description: 'Publish the package to PyPI'
inputs:
token:
description: 'Token to use for publishing.'
required: true
dry_run:
description: 'Is this a dry run. If so no package will be published.'
required: true

runs:
using: composite
steps:
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Install dependencies
shell: bash
run: |
pip install -r requirements.txt
pip install wheel
- name: Building publishable packages
shell: bash
run: python setup.py sdist bdist_wheel

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: ${{ inputs.dry_run == 'false' }}
with:
password: ${{inputs.token}}
153 changes: 153 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: Quality control checks

on:
push:
branches: [ 8.x ]
paths-ignore:
- '**.md' # Do not need to run CI for markdown changes.
pull_request:
branches: [ 8.x ]
paths-ignore:
- '**.md'

jobs:
linux:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

services:
redis:
image: redis
ports:
- 6379:6379
dynamodb:
image: amazon/dynamodb-local
ports:
- 8000:8000
consul:
image: hashicorp/consul
ports:
- 8500:8500

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install requirements
run: |
pipx install virtualenv
pip install -r test-requirements.txt
pip install -r test-filesource-optional-requirements.txt
pip install -r consul-requirements.txt
python setup.py install
pip freeze
- name: Run tests
run: pytest -s testing -W error::SyntaxWarning

- name: Test packaging
run: |
sudo rm -rf dist *.egg-info
./test-packaging/test-packaging.sh
- name: Verify typehints
run: make lint

- name: Verify docs can be successfully built
run: make docs

- name: build SSE contract test service
if: ${{ matrix.python-version != 3.7 }}
run: |
cd sse-contract-tests
make build-test-service
- name: start SSE contract test service
if: ${{ matrix.python-version != 3.7 }}
run: |
cd sse-contract-tests
make start-test-service &
- name: run SSE contract tests
if: ${{ matrix.python-version != 3.7 }}
run: |
cd sse-contract-tests
make run-contract-tests
- name: Build contract tests
if: ${{ matrix.python-version != 3.7 }}
run: make build-contract-tests

- name: Start contract test service
if: ${{ matrix.python-version != 3.7 }}
run: make start-contract-test-service &

- name: run contract tests
if: ${{ matrix.python-version != 3.7 }}
run: make run-contract-tests

windows:
runs-on: windows-latest

defaults:
run:
shell: powershell

strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Setup DynamoDB
run: |
$ProgressPreference = "SilentlyContinue"
iwr -outf dynamo.zip https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip
mkdir dynamo
Expand-Archive -Path dynamo.zip -DestinationPath dynamo
cd dynamo
cmd /c "START /b java -Djava.library.path=./DynamoDBLocal_lib -jar ./DynamoDBLocal.jar"
- name: Setup Consul
run: |
$ProgressPreference = "SilentlyContinue"
iwr -outf consul.zip https://releases.hashicorp.com/consul/1.4.2/consul_1.4.2_windows_amd64.zip
mkdir consul
Expand-Archive -Path consul.zip -DestinationPath consul
cd consul
sc.exe create "Consul" binPath="$(Get-Location)/consul.exe agent -dev"
sc.exe start "Consul"
- name: Setup Redis
run: |
$ProgressPreference = "SilentlyContinue"
iwr -outf redis.zip https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip
mkdir redis
Expand-Archive -Path redis.zip -DestinationPath redis
cd redis
./redis-server --service-install
./redis-server --service-start
Start-Sleep -s 5
./redis-cli ping
- name: Install requirements
run: |
pip install -r test-requirements.txt
pip install -r test-filesource-optional-requirements.txt
pip install -r consul-requirements.txt
python setup.py install
pip freeze
- name: Run tests
run: pytest -s testing -W error::SyntaxWarning
12 changes: 12 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Lint PR title

on:
pull_request_target:
types:
- opened
- edited
- synchronize

jobs:
lint-pr-title:
uses: launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main
Loading

0 comments on commit 59b8827

Please sign in to comment.