From 65cc0f907539b078abb8c33a5170bfb1828f371b Mon Sep 17 00:00:00 2001 From: SouthFox Date: Mon, 26 Feb 2024 21:27:11 +0800 Subject: [PATCH] [ci] add pytest workflow --- .forgejo/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .forgejo/workflows/test.yml diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml new file mode 100644 index 0000000..2f3f9f2 --- /dev/null +++ b/.forgejo/workflows/test.yml @@ -0,0 +1,28 @@ +on: [push] +jobs: + build-uberjar: + container: + image: nikolaik/python-nodejs:python3.11-nodejs21 + steps: + - uses: actions/checkout@v3 + + - name: Restore poetry project dependencies + uses: actions/cache/restore@v4 + with: + path: ~/.cache/pypoetry + key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} + + - name: Install poetry + run: | + pip install poetry + + - name: Run test + run: | + poetry install --no-root + poetry run pytest -vvv + + - name: Cache poetry project dependencies + uses: actions/cache/save@v4 + with: + path: ~/.cache/pypoetry + key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}