From 66025bc31d43c1fa0b7e0f66051c5fb0caa94d07 Mon Sep 17 00:00:00 2001 From: shmyga Date: Thu, 24 Sep 2026 10:17:08 +0300 Subject: [PATCH] ci(action): add build action --- .gitea/workflows/build.yaml | 34 ++++++++++++++++++++++++ .gitea/workflows/{test.yml => test.yaml} | 27 +++++-------------- 2 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 .gitea/workflows/build.yaml rename .gitea/workflows/{test.yml => test.yaml} (59%) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..b068968 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,34 @@ +name: test + +#on: +# push: +# tags: +# - "*" +on: push + +jobs: + build: + runs-on: ubuntu-latest + steps: + # repo + - name: Check out repository + uses: actions/checkout@v7 + # python + - name: Set up python + id: setup-python + uses: actions/setup-python@v7 + with: + python-version: "3.14" + cache: "project-manager" + # project-manager + - name: Install Project Manager + run: | + pip install project-manager \ + --index-url https://git.shmyga.ru/api/packages/InfernalGames/pypi/simple/ \ + --extra-index-url https://pypi.org/simple + # build + - name: Build docker + run: pm build:docker -vv + # pubish + #- name: Publish docker + # run: pm publish:docker -vv diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yaml similarity index 59% rename from .gitea/workflows/test.yml rename to .gitea/workflows/test.yaml index 5b8bcb5..7728f94 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yaml @@ -1,29 +1,26 @@ name: test -on: push +#on: push jobs: test: runs-on: ubuntu-latest steps: - #---------------------------------------------- - # check-out repo and set-up python - #---------------------------------------------- + # repo - name: Check out repository uses: actions/checkout@v7 + # python - name: Set up python id: setup-python uses: actions/setup-python@v7 with: python-version: "3.14" - #---------------------------------------------- - # install & configure poetry - #---------------------------------------------- + # poetry - name: Load cached Poetry installation id: cached-poetry uses: actions/cache@v5 with: - path: ~/.local # the path depends on the OS + path: ~/.local key: poetry-1 # increment to reset cache - name: Install Poetry if: steps.cached-poetry.outputs.cache-hit != 'true' @@ -33,29 +30,19 @@ jobs: virtualenvs-in-project: true virtualenvs-path: .venv installer-parallel: true - #---------------------------------------------- - # load cached venv if cache exists - #---------------------------------------------- + # venv - name: Load cached venv id: cached-poetry-dependencies uses: actions/cache@v5 with: path: .venv key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} - #---------------------------------------------- - # install dependencies if cache does not exist - #---------------------------------------------- - name: Install dependencies if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' run: ~/.local/bin/poetry install --no-interaction --no-root - #---------------------------------------------- - # install your root project, if required - #---------------------------------------------- - name: Install project run: ~/.local/bin/poetry install --no-interaction - #---------------------------------------------- - # run test suite - #---------------------------------------------- + # test - name: Run tests run: | source .venv/bin/activate