@@ -0,0 +1,40 @@
|
|||||||
|
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"
|
||||||
|
# project-manager
|
||||||
|
- name: Load cached Project Manager installation
|
||||||
|
id: cached-project-manager
|
||||||
|
uses: actions/cache@v5
|
||||||
|
with:
|
||||||
|
path: ~/.local
|
||||||
|
key: project-manager-0 # increment to reset cache
|
||||||
|
- name: Install Project Manager
|
||||||
|
if: steps.cached-project-manager.outputs.cache-hit != 'true'
|
||||||
|
run: |
|
||||||
|
pipx install project-manager \
|
||||||
|
-i https://git.shmyga.ru/api/packages/InfernalGames/pypi/simple/ \
|
||||||
|
--pip-args="--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
|
||||||
@@ -1,29 +1,26 @@
|
|||||||
name: test
|
name: test
|
||||||
|
|
||||||
on: push
|
#on: push
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
#----------------------------------------------
|
# repo
|
||||||
# check-out repo and set-up python
|
|
||||||
#----------------------------------------------
|
|
||||||
- name: Check out repository
|
- name: Check out repository
|
||||||
uses: actions/checkout@v7
|
uses: actions/checkout@v7
|
||||||
|
# python
|
||||||
- name: Set up python
|
- name: Set up python
|
||||||
id: setup-python
|
id: setup-python
|
||||||
uses: actions/setup-python@v7
|
uses: actions/setup-python@v7
|
||||||
with:
|
with:
|
||||||
python-version: "3.14"
|
python-version: "3.14"
|
||||||
#----------------------------------------------
|
# poetry
|
||||||
# install & configure poetry
|
|
||||||
#----------------------------------------------
|
|
||||||
- name: Load cached Poetry installation
|
- name: Load cached Poetry installation
|
||||||
id: cached-poetry
|
id: cached-poetry
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: ~/.local # the path depends on the OS
|
path: ~/.local
|
||||||
key: poetry-1 # increment to reset cache
|
key: poetry-1 # increment to reset cache
|
||||||
- name: Install Poetry
|
- name: Install Poetry
|
||||||
if: steps.cached-poetry.outputs.cache-hit != 'true'
|
if: steps.cached-poetry.outputs.cache-hit != 'true'
|
||||||
@@ -33,29 +30,19 @@ jobs:
|
|||||||
virtualenvs-in-project: true
|
virtualenvs-in-project: true
|
||||||
virtualenvs-path: .venv
|
virtualenvs-path: .venv
|
||||||
installer-parallel: true
|
installer-parallel: true
|
||||||
#----------------------------------------------
|
# venv
|
||||||
# load cached venv if cache exists
|
|
||||||
#----------------------------------------------
|
|
||||||
- name: Load cached venv
|
- name: Load cached venv
|
||||||
id: cached-poetry-dependencies
|
id: cached-poetry-dependencies
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: .venv
|
path: .venv
|
||||||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||||
#----------------------------------------------
|
|
||||||
# install dependencies if cache does not exist
|
|
||||||
#----------------------------------------------
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
||||||
run: ~/.local/bin/poetry install --no-interaction --no-root
|
run: ~/.local/bin/poetry install --no-interaction --no-root
|
||||||
#----------------------------------------------
|
|
||||||
# install your root project, if required
|
|
||||||
#----------------------------------------------
|
|
||||||
- name: Install project
|
- name: Install project
|
||||||
run: ~/.local/bin/poetry install --no-interaction
|
run: ~/.local/bin/poetry install --no-interaction
|
||||||
#----------------------------------------------
|
# test
|
||||||
# run test suite
|
|
||||||
#----------------------------------------------
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
Reference in New Issue
Block a user