diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c20c215..3dbd6e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: branches: - "**" tags: - - "v[0-9]+.[0-9]+.[0-9]+" # Semantic version tags + - "v*" # Semantic version tags pull_request: jobs: test: @@ -15,6 +15,8 @@ jobs: steps: - uses: actions/checkout@v4 with: + fetch-depth: 0 # full history + fetch-tags: true # redundant in v4, but explicit submodules: "recursive" - name: Set up Python uses: actions/setup-python@v5 @@ -24,7 +26,7 @@ jobs: run: | python -m pip install --upgrade pip pip install submodules/daggerml_cli/ - pip install .[test] + pip install .[dev] - name: pytest run: python -m pytest -m "not slow" . lint: diff --git a/pyproject.toml b/pyproject.toml index 952d392..d3e9268 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [] [project.optional-dependencies] cli = ["daggerml-cli>=0.0.33"] -test = [ +dev = [ "pytest", "pytest-cov", "moto[all,server]", @@ -60,9 +60,9 @@ markers = [ source = "vcs" [tool.hatch.version.raw-options] -version_scheme = "only-version" # use tag as version +version_scheme = "no-guess-dev" # use tag as version if exists local_scheme = "no-local-version" # pypi does not support local-schemes -tag_regex = "^v(?P[0-9.]+)$" +tag_regex = "^v(?P[0-9]+\\.[0-9]+\\.[0-9]+(?:[-\\.][a-zA-Z0-9]+)*)$" version_file = "src/daggerml/__about__.py" # write version info to this file relative_to = "{root:uri}" @@ -74,7 +74,7 @@ artifacts = [ [tool.hatch.envs.default] python="3.10" -features = ["test"] +features = ["dev"] dependencies = ["twine"] pre-install-commands = [ "pip install -e {root:uri}/submodules/daggerml_cli",