From 6daaf9b61c86d1aec79245af96cbff726c73ebd1 Mon Sep 17 00:00:00 2001 From: DevOps Bot Date: Sun, 11 Jan 2026 14:00:07 +0000 Subject: [PATCH] ci: pushing new workflows --- .github/workflows/changelog.yml | 19 +++++++----- .github/workflows/commit.yml | 2 +- .github/workflows/dependabot-auto-merge.yml | 4 --- .github/workflows/unit.yml | 34 +++++++++++++++++++++ 4 files changed, 47 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/unit.yml diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index f56a3fc..b177ad7 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -6,22 +6,27 @@ jobs: steps: - uses: actions/checkout@v6 with: - fetch-depth: 0 - fetch-tags: true submodules: true + token: ${{ secrets.PAT_TOKEN }} - id: previoustag name: Get Latest Tag - run: |- - echo ::set-output name=tag::$(git describe --tags "$(git rev-list --tags --max-count=1)") - echo $(git describe --tags "$(git rev-list --tags --max-count=1)") + run: | + git fetch --tags + last_tag_wprefix=$(git tag --list --sort=-v:refname | head -n 1) + last_tag=$last_tag_wprefix + echo $last_tag_wprefix + echo $last_tag + + echo last_tag=$last_tag >> $GITHUB_ENV - id: changelog if: github.ref_name == 'main' name: Generate new Tag uses: TriPSs/conventional-changelog-action@v6 with: - fallback-version: ${{ steps.previoustag.outputs.tag }} + fallback-version: ${{ env.last_tag }} + git-path: '' git-url: ${{ github.server_url != 'https://github.com' && 'git.yusufali.ca' || 'github.com' }} - github-token: ${{ github.token }} + github-token: ${{ secrets.PAT_TOKEN }} output-file: false skip-ci: false skip-commit: true diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 7727def..ef68666 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -11,7 +11,7 @@ jobs: submodules: true - uses: actions/setup-node@v6 with: - node-version: 23.1 + node-version: current - name: Install commitlint run: | if [ -f package.json ]; then diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 03cd6ef..47b5615 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -18,8 +18,6 @@ jobs: steps: - uses: actions/checkout@v6 with: - fetch-depth: 0 - fetch-tags: true submodules: true - &id001 name: Setup GitHub CLI @@ -37,8 +35,6 @@ jobs: steps: - uses: actions/checkout@v6 with: - fetch-depth: 0 - fetch-tags: true submodules: true - *id001 - env: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml new file mode 100644 index 0000000..6c51e2b --- /dev/null +++ b/.github/workflows/unit.yml @@ -0,0 +1,34 @@ +jobs: + unittest: + runs-on: + - ubuntu-latest + steps: + - uses: actions/checkout@v6 + with: + submodules: true + - uses: actions/setup-python@v5 + with: + python-version: 3.13 + - env: + EXTRA_MODULES: '' + name: Install pip dependencies + run: |- + if [ -n "$EXTRA_MODULES" ]; then + pip install $EXTRA_MODULES + fi + if [ ! -f pip-options.txt ]; then + touch pip-options.txt + fi + + pip install -r requirements.txt -r pip-options.txt + pip install -r requirements-dev.txt -r pip-options.txt || true + - name: Type Check + run: mypy *.py --check-untyped-defs + - name: Run Tests + run: |2- + + coverage run -m unittest tests/*.py + coverage report -m --fail-under=70 +name: Unit Test +'on': + pull_request: {}