From f7b4d420882dc04f7d03a9450cb258508db604ab Mon Sep 17 00:00:00 2001 From: gmankab Date: Sun, 9 Jun 2024 11:03:30 +0400 Subject: [PATCH] [+] github actions autotests --- .github/workflows/tests.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..2d31267 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,34 @@ +name: autotests +on: [push, pull_request] +jobs: + autotests-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: dependencies + run: | + python -m venv .venv + .venv/bin/pip install -U pip + .venv/bin/pip install -U tortoise-orm aiogram fastapi rich ruff pyright + - name: tests + run: tests=true .venv/bin/python galaxy_backend + autotests-windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: dependencies + run: | + python -m venv .venv + .venv/scripts/pip install -U pip + .venv/scripts/pip install -U tortoise-orm aiogram fastapi rich ruff pyright + - name: tests + run: | + $env:tests = 'true' + .venv/scripts/python galaxy_backend +