Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…opier to v0.5.0 (#3)

Co-authored-by: salt-extensions-renovatebot[bot] <182623858+salt-extensions-renovatebot[bot]@users.noreply.github.com>
  • Loading branch information
salt-extensions-renovatebot[bot] authored Oct 7, 2024
1 parent 405fce6 commit 89d7c6a
Show file tree
Hide file tree
Showing 18 changed files with 122 additions and 100 deletions.
25 changes: 25 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
coverage:
status:
project:
default: false
app:
informational: true
paths:
- src/
tests:
informational: true
paths:
- tests/
patch:
default: false
app:
informational: true
paths:
- src/
tests:
informational: true
paths:
- tests/
github_checks:
annotations: false
3 changes: 1 addition & 2 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Autogenerated. Do not edit this by hand, use `copier update`.
---
_commit: 0.4.7
_commit: 0.5.0
_src_path: https://github.com/salt-extensions/salt-extension-copier
author: jeanluc
author_email: lkubb@protonmail.com
Expand Down Expand Up @@ -29,4 +29,3 @@ summary: Salt Extension for interacting with Telegram
test_containers: false
tracker_url: https://github.com/salt-extensions/saltext-telegram/issues
url: https://github.com/salt-extensions/saltext-telegram
workflows: enhanced
12 changes: 7 additions & 5 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ omit =

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

exclude_also =
# Don't complain about missing debug-only code:
def __repr__

Expand All @@ -26,12 +23,17 @@ exclude_lines =
if 0:
if False:
if __name__ == .__main__.:
if TYPE_CHECKING:
@(abc\.)?abstractmethod

# Add markers which exclude statements in between.
# Requires coverage>=7.6.0.
no cover: start(?s:.)*?no cover: stop

omit =
.nox/*
setup.py


ignore_errors = True

[paths]
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ jobs:
name: Get Changed Files
uses: ./.github/workflows/get-changed-files.yml

changed-files-debug:
name: Changed Files Debug Output
runs-on: ubuntu-latest
if: always()
needs:
- get-changed-files
steps:
- name: Echo Changed Files Output
run: echo "${{ toJSON(needs.get-changed-files.outputs.changed-files) }}"

pre-commit:
name: Pre-Commit
uses: ./.github/workflows/pre-commit-action.yml
Expand Down Expand Up @@ -107,7 +97,7 @@ jobs:
# This step is just so we can make github require this step, to pass checks
# on a pull request instead of requiring all
name: Set the CI Pipeline Exit Status
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
if: always()
needs:
- test
Expand All @@ -116,18 +106,19 @@ jobs:
- build-python-package
- deploy-python-package-test-pypi
- deploy-python-package

steps:
- name: Download Exit Status Files
if: always()
uses: actions/download-artifact@v4
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
path: exitstatus
pattern: exitstatus-*
merge-multiple: true

- name: Delete Exit Status Artifacts
if: always()
uses: geekyeggo/delete-artifact@v5
uses: geekyeggo/delete-artifact@7ee91e82b4a7f3339cd8b14beace3d826a2aac39 # v5.1.0
with:
name: exitstatus-*
useGlob: true
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/deploy-docs-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,29 +35,30 @@ jobs:
pages: write
id-token: write

runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Download built docs
uses: actions/download-artifact@v4
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: ${{ inputs.artifact-name }}
path: html-docs

- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
name: html-docs-pages
path: html-docs

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
with:
artifact_name: html-docs-pages

- name: Delete GitHub Pages artifact
if: always()
uses: geekyeggo/delete-artifact@v5
uses: geekyeggo/delete-artifact@7ee91e82b4a7f3339cd8b14beace3d826a2aac39 # v5.1.0
with:
name: html-docs-pages
failOnError: false
Expand All @@ -70,7 +71,7 @@ jobs:
- name: Upload Exit Status
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: exitstatus-${{ github.job }}
path: exitstatus
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/deploy-package-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ on:
jobs:
build:
name: Publish Python Package to ${{ fromJSON('["PyPI", "Test PyPI"]')[inputs.test] }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- name: Download Python Package Artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: salt-extension-${{ inputs.version }}-packages
path: dist

- name: Publish distribution to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@c44d2f0e52f028349e3ecafbf7f32561da677277 # v1.10.3
if: ${{ inputs.test }}
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
Expand All @@ -47,7 +48,7 @@ jobs:
dist/*
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@c44d2f0e52f028349e3ecafbf7f32561da677277 # v1.10.3
if: ${{ !inputs.test }}
with:
password: ${{ secrets.PYPI_API_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/docs-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ on:

jobs:
Docs:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

- name: Set up Python 3.10 For Nox
uses: actions/setup-python@v5
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.10"

Expand All @@ -35,7 +35,7 @@ jobs:
nox --force-color -e docs
- name: Upload built docs as artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: html-docs
path: docs/_build/html
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Upload Exit Status
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: exitstatus-${{ github.job }}
path: exitstatus
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/get-changed-files.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,19 @@ on:
jobs:
get-changed-files:
name: Get Changed Files
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files
pull-requests: read # for dorny/paths-filter to read pull requests
outputs:
changed-files: ${{ toJSON(steps.changed-files.outputs) }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Get Changed Files
id: changed-files
uses: dorny/paths-filter@v3
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
with:
token: ${{ github.token }}
list-files: escape
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/package-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ on:
jobs:
build:
name: Build Python Packages (wheel and sdist)
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0

- name: Set up Python 3.10
uses: actions/setup-python@v5
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: "3.10"

Expand All @@ -37,7 +38,7 @@ jobs:
run: python -m build --outdir dist/

- name: Upload build artifacts
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
if: always()
with:
name: salt-extension-${{ inputs.version }}-packages
Expand All @@ -52,7 +53,7 @@ jobs:
- name: Upload Exit Status
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: exitstatus-${{ github.job }}
path: exitstatus
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pre-commit-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ on:
jobs:
Pre-Commit:
name: Pre-Commit
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
container:
image: python:3.10.14-slim-bookworm
image: docker.io/library/python:3.10.15-slim-bookworm@sha256:1eb5d76bf3e9e612176ebf5eadf8f27ec300b7b4b9a99f5856f8232fd33aa16e

steps:
- name: Install System Deps
Expand All @@ -23,7 +23,7 @@ jobs:
apt-get install -y enchant-2 git gcc make zlib1g-dev libc-dev libffi-dev g++ libxml2 libxml2-dev libxslt-dev libcurl4-openssl-dev libssl-dev libgnutls28-dev
git config --global --add safe.directory "$(pwd)"
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Install Pre-Commit
run: |
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Upload Exit Status
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: exitstatus-${{ github.job }}
path: exitstatus
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ on:

jobs:
get_tag_version:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Extract tag name
id: get_version
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:

Linux:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 30

strategy:
Expand All @@ -21,12 +21,12 @@ jobs:
- {salt-version: "3007.1", python-version: "3.10"}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 2 # coverage: Issue detecting commit SHA

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
echo "flags=$(python -c "import sys; print('{},{},salt_{}'.format('${{ runner.os }}'.replace('-latest', ''), 'py{}{}'.format(*sys.version_info), '_'.join(str(v) for v in '${{ matrix.salt-version }}'.replace('==', '_').split('.'))))")" >> "$GITHUB_OUTPUT"
- name: Upload Project Code Coverage
uses: codecov/codecov-action@v4.5.0 # https://github.com/codecov/codecov-action/issues/1594
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
file: artifacts/coverage-project.xml
disable_search: true
Expand All @@ -66,7 +66,7 @@ jobs:
version: v0.7.5

- name: Upload Tests Code Coverage
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
file: artifacts/coverage-tests.xml
disable_search: true
Expand All @@ -78,7 +78,7 @@ jobs:

- name: Upload Logs
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: runtests-${{ runner.os }}-py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}.log
path: artifacts/runtests-*.log
Expand All @@ -91,7 +91,7 @@ jobs:
- name: Upload Exit Status
if: always()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: exitstatus-${{ github.job }}-Py${{ matrix.python-version }}-Salt${{ matrix.salt-version }}
path: exitstatus
Expand Down
Loading

0 comments on commit 89d7c6a

Please sign in to comment.