From daea56fecda79c11cf696ce7d0f30cdd38e2a660 Mon Sep 17 00:00:00 2001 From: Federico Berto Date: Mon, 9 Sep 2024 19:43:22 +0900 Subject: [PATCH] [Feat] Add automated CI tests Co-authored-by: Chuanbo Hua Co-authored-by: Laurin Luttmann Co-authored-by: Jiwoo Son --- .github/workflows/test.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..d3a2e7e --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,37 @@ +name: Tests +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + os: [ubuntu-latest] + python-version: ['3.12'] + defaults: + run: + shell: bash + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Load cached venv + id: cached-pip-wheels + uses: actions/cache@v3 + with: + path: ~/.cache + key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -e . + + - name: Run pytest + run: pytest tests/*.py