Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# Dependabot version updates.
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
#
# Same shape in every commit-check repository: monthly, one grouped pull
# request per ecosystem, `chore(deps)` commit subjects. The one exception is
# pip here, which stays daily with no cooldown: requirements.txt pins the
# commit-check release this action ships, and a new release should reach the
# action the day it is published.

version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: "weekly"
interval: monthly
commit-message:
prefix: chore
include: scope
groups:
github-actions:
patterns:
- "*"

- package-ecosystem: pip
directory: /
schedule:
interval: "daily"
interval: daily
cooldown:
default-days: 0
commit-message:
prefix: chore
include: scope
1 change: 0 additions & 1 deletion .github/stale.yml

This file was deleted.

32 changes: 31 additions & 1 deletion .github/workflows/test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: CI

permissions:
contents: read
Expand Down Expand Up @@ -44,3 +44,33 @@ jobs:

- name: Run unit tests
run: python -m pytest main_test.py -v

coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# Nothing after checkout needs authenticated git.
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
# 3.10 is the real floor, see the test job
python-version: "3.10"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install pytest pytest-cov
- name: Run tests with coverage
run: |
pytest --cov=main --cov-report=xml --cov-report=term-missing main_test.py
- name: Upload coverage to Codecov
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
with:
# Required: main is a protected branch, so Codecov rejects tokenless uploads.
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
# Hard-fail on push to main so a broken upload is visible; on PRs the
# report is informational and a flaky upload should not block review.
fail_ci_if_error: ${{ github.event_name == 'push' }}
3 changes: 3 additions & 0 deletions .github/workflows/commit-check.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Commit Check

permissions:
contents: read

on:
pull_request:
branches: 'main'
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/coverage.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run pre-commit
name: pre-commit
permissions:
contents: read

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
- "main"
workflow_dispatch:

permissions: {}

jobs:
draft-release:
permissions:
contents: write
pull-requests: write
uses: commit-check/.github/.github/workflows/release-drafter.yml@main
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Release
name: Retag v2
permissions:
contents: write

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 shenxianpeng (xianpeng.shen@gmail.com)
Copyright (c) 2023 Xianpeng Shen

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading