-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from bellingcat/feat/unittest
CI Unit tests
- Loading branch information
Showing
20 changed files
with
514 additions
and
149 deletions.
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,38 @@ | ||
name: Core Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- src/** | ||
pull_request: | ||
paths: | ||
- src/** | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
defaults: | ||
run: | ||
working-directory: ./ | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'poetry' | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-interaction --with dev | ||
|
||
- name: Run Core Tests | ||
run: poetry run pytest -ra -v -m "not download" |
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,38 @@ | ||
name: Download Tests | ||
|
||
on: | ||
schedule: | ||
- cron: '35 14 * * 1' | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- src/** | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.10"] # only run expensive downloads on one (lowest) python version | ||
defaults: | ||
run: | ||
working-directory: ./ | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'poetry' | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-interaction --with dev | ||
|
||
- name: Run Download Tests | ||
run: poetry run pytest -ra -v -m "download" |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Oops, something went wrong.