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

chore: Add a test workflow #679

Merged
merged 23 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
244bb99
chore: Add a test workflow
edgarrmondragon May 30, 2022
8a82a52
chore: Add pip constraints
edgarrmondragon May 30, 2022
0dd412f
chore: Add dependabot
edgarrmondragon May 30, 2022
bce055b
chore: Add workflow trigger
edgarrmondragon May 30, 2022
5bdd314
chore: Fix matrix yaml indentation
edgarrmondragon May 30, 2022
d60a990
chore: Fix file name
edgarrmondragon May 30, 2022
8acd214
chore: Add poetry cache
edgarrmondragon May 30, 2022
51eacaf
chore: Remove duplicate step
edgarrmondragon May 30, 2022
8e8c2c6
chore: Move poetry installation step before setup-python
edgarrmondragon May 30, 2022
9e41c41
chore: Use explicit Python version for Poetry venv
edgarrmondragon May 30, 2022
d0475bf
chore: Add lint job
edgarrmondragon May 30, 2022
82b08e2
chore: Use tox environments in matrix
edgarrmondragon May 31, 2022
3596977
test: Mark all tests under tests/external*/ as 'external'
edgarrmondragon May 31, 2022
999e10b
test: Combine coverage
edgarrmondragon May 31, 2022
85ae491
test: Continue to coverage if external tests fail
edgarrmondragon May 31, 2022
ef6b2bc
test: Add --parallel flag for coverage
edgarrmondragon May 31, 2022
751fd9e
Make sure tox is installed
edgarrmondragon May 31, 2022
be8c8bc
Fix tox env name
edgarrmondragon May 31, 2022
f9b661f
Upload coverage
edgarrmondragon May 31, 2022
784a631
Coverage fail under 85%
edgarrmondragon May 31, 2022
c846247
Add doctest to matrix
edgarrmondragon May 31, 2022
ff7e13f
Add dependabot for GitHub Actions
edgarrmondragon May 31, 2022
d44eb3c
skip external tests temporarily
aaronsteers Jun 1, 2022
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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/.github/workflows"
schedule:
interval: daily
time: "12:00"
timezone: "UTC"
reviewers: []
labels: []
3 changes: 3 additions & 0 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pip==22.1.1
poetry==1.1.13
virtualenv==20.14.1
59 changes: 59 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Test

on:
pull_request: {}
push:
branches: [main]
workflow_dispatch:
inputs: {}

jobs:
tests:
name: Test on ${{ matrix.python-version }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
continue-on-error: false
strategy:
fail-fast: false
matrix:
include:
- { python-version: "3.7", os: "ubuntu-latest" }
- { python-version: "3.8", os: "ubuntu-latest" }
- { python-version: "3.9", os: "ubuntu-latest" }
- { python-version: "3.10", os: "ubuntu-latest" }

steps:
- name: Check out the repository
uses: actions/[email protected]

- name: Install Poetry
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pipx install poetry
poetry --version

- name: Setup Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
architecture: x64
cache: 'poetry'

- name: Upgrade pip
env:
PIP_CONSTRAINT: .github/workflows/constraints.txt
run: |
pip install pip
pip --version

- name: Install Dependencies
run: |
poetry env use "${{ matrix.python-version }}"
aaronsteers marked this conversation as resolved.
Show resolved Hide resolved
poetry install

# TODO: Run complete test suite. Requires setting up some repository secrets
- name: Run tests
run: |
poetry run pytest --doctest-modules singer_sdk
poetry run pytest tests/core
poetry run pytest tests/cookiecutters