Skip to content

Commit

Permalink
Add ci that runs tests on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
zongsizhang committed Sep 11, 2024
1 parent 04c59e2 commit debf48f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/on_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CI for verifying PR

on:
pull_request:
branches:
- dev
- main
types: [ opened, synchronize, reopened ]
paths-ignore:
- README.md

jobs:
run-unit-tests:
uses: ./.github/workflows/unite_tests.yaml
29 changes: 29 additions & 0 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: CI for unit testing

on:
workflow_call:

jobs:
execute-tests:
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python
id: setup-python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install dependencies
working-directory: .
run: poetry install --no-interaction --no-ansi -vvv
shell: bash
- name: Run tests
run: poetry run pytest tests/
shell: bash
Empty file.

0 comments on commit debf48f

Please sign in to comment.