From 30600d0ce2f7bf60de1cf69f704ba69bf27e87cd 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 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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..8a39fdb --- /dev/null +++ b/.forgejo/workflows/test.yml @@ -0,0 +1,29 @@ +on: [push] +jobs: + build-uberjar: + runs-on: docker + steps: + - uses: actions/checkout@v3 + + - name: Install poetry + run: pipx install poetry + + - name: Restore poetry project dependencies + uses: actions/cache/restore@v4 + with: + path: ~/.cache/pypoetry + key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} + + - name: Setup python + run: | + apt install software-properties-common + add-apt-repository ppa:deadsnakes/ppa + apt update + apt install python3.12 -y + + + - name: Cache poetry project dependencies + uses: actions/cache/save@v4 + with: + path: ~/.cache/pypoetry + key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}