-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e9b36a
commit 1ab08a8
Showing
2 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: Integration Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
POETRY_VERSION: "1.7.1" | ||
POETRY_URL: https://install.python-poetry.org | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Poetry | ||
run: | | ||
pipx install poetry | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
cache-dependency-path: poetry.lock | ||
- name: Set Poetry environment | ||
run: | | ||
poetry env use ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
poetry install --no-root --only dev --all-extras | ||
- name: Lint Python (Black) | ||
run: | | ||
poetry run inv formatter | ||
- name: Lint Python (Ruff) | ||
run: | | ||
poetry run inv lint | ||
- name: Lint Python (isort) | ||
run: | | ||
poetry run inv isort | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install Poetry | ||
run: | | ||
pipx install poetry | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: poetry | ||
cache-dependency-path: poetry.lock | ||
- name: Set Poetry environment | ||
run: | | ||
poetry env use ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
poetry install --all-extras | ||
- name: Run Integration Tests | ||
env: | ||
AI21_API_KEY: ${{ secrets.AI21_API_KEY }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
run: | | ||
poetry run pytest tests/integration_tests/ | ||
- name: Upload pytest integration tests results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pytest-results-${{ matrix.python-version }} | ||
path: junit/test-results-${{ matrix.python-version }}.xml | ||
# Use always() to always run this step to publish test results when there are test failures | ||
if: ${{ always() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Test | ||
name: Unittest | ||
|
||
on: [push] | ||
|
||
|