Skip to content

Commit

Permalink
Merge branch 'main' into http-connector
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Jan 11, 2024
2 parents dcf83f3 + 2fe3e8d commit 5a53ce7
Show file tree
Hide file tree
Showing 73 changed files with 1,404 additions and 918 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ body:
attributes:
label: Singer SDK Version
description: Version of the library you are using
placeholder: "0.34.0"
placeholder: "0.34.1"
validations:
required: true
- type: checkboxes
Expand Down
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ updates:
interval: weekly
reviewers: [meltano/engineering]
labels: [deps]
groups:
actions:
patterns:
- "*"
12 changes: 4 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ jobs:
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
- uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,8 +52,7 @@ jobs:

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -67,5 +64,4 @@ jobs:
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- uses: github/codeql-action/analyze@v3
26 changes: 18 additions & 8 deletions .github/workflows/codspeed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ on:
push:
branches:
- "main"
paths:
- "singer_sdk/**"
- "tests/**"
- "noxfile.py"
- "poetry.lock"
- "pyproject.toml"
- ".github/workflows/codspeed.yml"
pull_request:
paths:
- "singer_sdk/**"
- "tests/**"
- "noxfile.py"
- "poetry.lock"
- "pyproject.toml"
- ".github/workflows/codspeed.yml"
# `workflow_dispatch` allows CodSpeed to trigger backtest
# performance analysis in order to generate initial data.
workflow_dispatch:
Expand All @@ -13,13 +27,10 @@ jobs:
benchmarks:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4.1.1

- name: Setup Python
uses: actions/setup-python@v4.7.1
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.12
architecture: x64

- name: Install poetry
Expand All @@ -37,8 +48,7 @@ jobs:
--with benchmark
--all-extras
- name: Run benchmarks
uses: CodSpeedHQ/action@v2
- uses: CodSpeedHQ/action@v2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: pytest tests/ --codspeed
5 changes: 3 additions & 2 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
pip==23.3.1
pip==23.3.2
poetry==1.7.1
poetry-plugin-export==1.6.0
pre-commit==3.5.0
poetry-dynamic-versioning==1.2.0
pre-commit==3.6.0
nox==2023.4.22
nox-poetry==1.0.3
11 changes: 4 additions & 7 deletions .github/workflows/cookiecutter-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ jobs:
- { python-version: "3.11", os: "ubuntu-latest" }

steps:
- name: Check out the repository
uses: actions/checkout@v4.1.1

- uses: actions/checkout@v4
- name: Upgrade pip
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
Expand All @@ -52,8 +50,7 @@ jobs:
poetry --version
poetry self show plugins
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand All @@ -77,10 +74,10 @@ jobs:
run: |
nox --python=${{ matrix.python-version }} --session=test_cookiecutter
- name: Upload build artifacts
- uses: actions/upload-artifact@v4
if: always()
uses: actions/upload-artifact@v3
with:
name: cookiecutter-${{ matrix.os }}-py${{ matrix.python-version }}
path: |
/tmp/tap-*
/tmp/target-*
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4.1.1

- name: GitHub dependency vulnerability check
- uses: actions/checkout@v4
- uses: actions/dependency-review-action@v3
if: ${{ github.event_name == 'pull_request_target' }}
uses: actions/dependency-review-action@v3.1.4
with:
fail-on-severity: high
51 changes: 16 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,32 @@ name: Release

on:
push:
tags:
- v*

permissions:
contents: write # Needed to upload artifacts to the release
id-token: write # Needed for OIDC PyPI publishing

jobs:
release:
name: Publish to PyPI
build:
runs-on: ubuntu-latest
environment: publishing

steps:
- name: Checkout code
uses: actions/checkout@v4.1.1

- name: Set up Python
uses: actions/setup-python@v4.7.1
- uses: actions/checkout@v4
with:
python-version: "3.11"

- name: Upgrade pip
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pip install pip
pip --version
- name: Install Poetry
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install poetry
poetry --version
- name: Check version
run: |
version=$(poetry version | awk '{print $2}')
tag=$(echo "${{ github.ref }}" | awk '{split($0,p,"/"); print p[3]}')
if [ "v$version" != $tag ]; then echo "Release tag and package version do not match!"; exit 1; fi;
- name: Build
run: poetry build
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2

publish:
name: Publish to PyPI
runs-on: ubuntu-latest
environment:
name: publishing
url: https://pypi.org/p/singer-sdk
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Upload wheel to release
uses: svenstaro/upload-release-action@v2
with:
Expand Down
48 changes: 23 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,28 +47,29 @@ jobs:
matrix:
session: [tests]
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
sqlalchemy: ["2.*"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
sqlalchemy: ["2"]
include:
- { session: tests, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "1.*" }
- { session: doctest, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "2.*" }
- { session: mypy, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "2.*" }
- { session: tests, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "1" }
- { session: doctest, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "2" }
- { session: mypy, python-version: "3.11", os: "ubuntu-latest", sqlalchemy: "2" }

steps:
- name: Check out the repository
uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Poetry
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install poetry
pipx inject poetry poetry-plugin-export
pipx inject poetry poetry-dynamic-versioning[plugin]
poetry --version
poetry self show plugins
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.7.1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
Expand Down Expand Up @@ -96,11 +97,10 @@ jobs:
run: |
nox --verbose
- name: Upload coverage data
- uses: actions/upload-artifact@v4
if: always() && (matrix.session == 'tests')
uses: actions/upload-artifact@v3.1.2
with:
name: coverage-data
name: coverage-data-nox_${{ matrix.session }}-${{ matrix.os }}-py${{ matrix.python-version }}_sqlalchemy_${{ matrix.sqlalchemy }}
path: ".coverage.*"

tests-external:
Expand All @@ -119,20 +119,21 @@ jobs:
SAMPLE_TAP_GOOGLE_ANALYTICS_VIEW_ID: ${{ secrets.SAMPLE_TAP_GOOGLE_ANALYTICS_VIEW_ID }}

steps:
- name: Check out the repository
uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Poetry
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install poetry
pipx inject poetry poetry-plugin-export
pipx inject poetry poetry-dynamic-versioning[plugin]
poetry --version
poetry self show plugins
- name: Setup Python
uses: actions/setup-python@v4.7.1
- uses: actions/setup-python@v5
with:
python-version: ${{ env.NOXPYTHON }}
architecture: x64
Expand Down Expand Up @@ -163,8 +164,7 @@ jobs:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Check out the repository
uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4

- name: Install Poetry
env:
Expand All @@ -175,8 +175,7 @@ jobs:
poetry --version
poetry self show plugins
- name: Set up Python
uses: actions/setup-python@v4.7.1
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
Expand All @@ -187,10 +186,10 @@ jobs:
pip install --constraint=.github/workflows/constraints.txt pip
pip --version
- name: Download coverage data
uses: actions/download-artifact@v3.0.2
- uses: actions/download-artifact@v4
with:
name: coverage-data
pattern: coverage-data-*
merge-multiple: true

- name: Install Nox
env:
Expand All @@ -208,8 +207,7 @@ jobs:
run: |
nox --session=coverage -- xml
- name: Upload coverage report
uses: codecov/codecov-action@v3.1.4
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
5 changes: 2 additions & 3 deletions .github/workflows/version_bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,11 @@ jobs:
discussions: write # to create a discussion

steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4.7.1
- uses: actions/setup-python@v5
with:
python-version: "3.11"
architecture: x64
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ repos:
)$
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.2
rev: 0.27.3
hooks:
- id: check-dependabot
- id: check-github-workflows
- id: check-readthedocs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
rev: v0.1.11
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand All @@ -60,7 +60,7 @@ repos:
)$
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies:
Expand Down
Loading

0 comments on commit 5a53ce7

Please sign in to comment.