Skip to content

Commit

Permalink
ci: Only run tests when relevant code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed Aug 26, 2024
1 parent 3dd084b commit b820934
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
name: Test tap-stackexchange

on: [push]
on:
push:
branches: [main]
paths:
- .github/workflows/constraints.txt
- .github/workflows/test.yml
- tap_stackexchange/**
- tests/**
- poetry.lock
- pyproject.toml
- tox.ini
pull_request:
branches: [main]
paths:
- .github/workflows/constraints.txt
- .github/workflows/test.yml
- tap_stackexchange/**
- tests/**
- poetry.lock
- pyproject.toml
- tox.ini
schedule:
- cron: "0 10 * * *"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -13,7 +36,13 @@ jobs:
PIP_CONSTRAINT: ${{ github.workspace }}/.github/workflows/constraints.txt
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"

steps:
- name: Checkout code
Expand Down
15 changes: 6 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[build-system]
build-backend = "poetry_dynamic_versioning.backend"
requires = [
"poetry-core==1.8.1",
"poetry-dynamic-versioning==1.2",
"poetry-core==1.9",
"poetry-dynamic-versioning==1.4",
]

[tool.poetry]
name = "tap-stackexchange"
version = "0.0.0"
description = "`tap-stackexchange` is a Singer tap for StackExchange, built with the Meltano SDK for Singer Taps."
description = "Singer tap for StackExchange, built with the Meltano SDK for Singer Taps."
authors = [
"Edgar Ramírez-Mondragón <edgarrm358@gmail.com>",
]
Expand All @@ -19,6 +19,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
keywords = [
"ELT",
Expand Down Expand Up @@ -72,11 +73,7 @@ lint.isort.required-imports = [
lint.pydocstyle.convention = "google"

[tool.mypy]
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true

[[tool.mypy.overrides]]
module = [
"ratelimit",
]
ignore_missing_imports = true

0 comments on commit b820934

Please sign in to comment.