From 238ae4bf3ed431e576bd52ff7e452bea3ac3e942 Mon Sep 17 00:00:00 2001 From: nicholasmhughes Date: Sat, 13 Jan 2024 12:23:43 -0500 Subject: [PATCH] copier profile 0.2.7 --- .copier-answers.yml | 3 ++- .github/workflows/pr.yml | 10 ++++++++-- .github/workflows/tag.yml | 27 ++++++++++++++++----------- docs/conf.py | 2 ++ pyproject.toml | 4 ++-- tests/unit/conftest.py | 5 +++++ 6 files changed, 35 insertions(+), 16 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index 41066c8..82ba8e9 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,6 +1,6 @@ # Autogenerated. Do not edit this by hand, use `copier update`. --- -_commit: 0.2.6 +_commit: 0.2.7 _src_path: https://github.com/lkubb/salt-extension-copier author: EITR Technologies, LLC author_email: eitr@devops.tech @@ -23,3 +23,4 @@ ssh_fixtures: false summary: Salt Extension for interacting with Consul tracker_url: https://github.com/salt-extensions/saltext-consul/issues url: https://github.com/salt-extensions/saltext-consul +workflows: org diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index c612d7a..1681969 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1,9 +1,15 @@ name: Pull Request or Push -on: [push, pull_request] +on: + push: + branches: + - 'main' # Run on pushes to main + tags-ignore: + - '*' # Ignore pushes to tags + pull_request: jobs: - ci: + call_central_workflow: name: CI uses: salt-extensions/central-artifacts/.github/workflows/ci.yml@main permissions: diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index 9f86b4e..a3bf12d 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -3,24 +3,29 @@ name: Tagged Releases on: push: tags: - - "v*" + - "v*" # Only tags starting with "v" for "v1.0.0", etc. jobs: - ci: + get_tag_version: runs-on: ubuntu-latest + outputs: + version: ${{ steps.get_version.outputs.version }} steps: - name: Checkout code uses: actions/checkout@v4 - name: Extract tag name id: get_version - run: echo "VERSION=$(echo ${GITHUB_REF#refs/tags/v})" >> $GITHUB_ENV + run: echo "::set-output name=version::$(echo ${GITHUB_REF#refs/tags/v})" - - name: CI - uses: salt-extensions/central-artifacts/.github/workflows/ci.yml@main - with: - release: true - version: ${{ env.VERSION }} - permissions: - contents: write - pull-requests: read + call_central_workflow: + needs: get_tag_version + uses: salt-extensions/central-artifacts/.github/workflows/ci.yml@main + with: + release: true + version: ${{ needs.get_tag_version.outputs.version }} + permissions: + contents: write + id-token: write + pull-requests: read + secrets: inherit diff --git a/docs/conf.py b/docs/conf.py index 01c5561..ac18474 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -125,6 +125,8 @@ autosummary_generate = False +suppress_warnings = ["myst.header"] + # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for diff --git a/pyproject.toml b/pyproject.toml index 7be35b8..ea1bb36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -72,8 +72,8 @@ lint = [ "saltpylint", ] tests = [ - "pytest>=6.1.0", - "pytest-salt-factories>=1.0.0rc19", + "pytest>=7.2.0", + "pytest-salt-factories>=1.0.0rc28", ] [project.entry-points."salt.loader"] diff --git a/tests/unit/conftest.py b/tests/unit/conftest.py index 3e3fa4a..b3b6ced 100644 --- a/tests/unit/conftest.py +++ b/tests/unit/conftest.py @@ -1,3 +1,5 @@ +import os + import pytest import salt.config @@ -17,6 +19,7 @@ def minion_opts(tmp_path): dirpath.mkdir(parents=True) opts[name] = str(dirpath) opts["log_file"] = "logs/minion.log" + opts["conf_file"] = os.path.join(opts["conf_dir"], "minion") return opts @@ -35,6 +38,7 @@ def master_opts(tmp_path): dirpath.mkdir(parents=True) opts[name] = str(dirpath) opts["log_file"] = "logs/master.log" + opts["conf_file"] = os.path.join(opts["conf_dir"], "master") return opts @@ -54,4 +58,5 @@ def syndic_opts(tmp_path): dirpath.mkdir(parents=True) opts[name] = str(dirpath) opts["log_file"] = "logs/syndic.log" + opts["conf_file"] = os.path.join(opts["conf_dir"], "syndic") return opts