Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge private main forward #232

Merged
merged 5 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 0 additions & 190 deletions .circleci/config.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/actions/publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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
pip install setuptools

- 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}}
134 changes: 134 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name: Quality control checks

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

jobs:
linux:
runs-on: ubuntu-latest

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

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 setuptools
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 contract tests
run: make build-contract-tests

- name: Start contract test service
run: make start-contract-test-service &

- name: run contract tests
run: make run-contract-tests

windows:
runs-on: windows-latest

defaults:
run:
shell: powershell

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

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 setuptools
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
Loading