Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.1.7] Chore update #336

Merged
merged 23 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
42 changes: 26 additions & 16 deletions .github/workflows/cicd-pr-dev-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ permissions:
contents: write
actions: read

env:
PYTHON_VERSION: "3.11"

jobs:
check-commit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -56,6 +59,9 @@ jobs:
build:
runs-on: ubuntu-latest
needs: [check-commit]
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
# [`master` PR] (Except "Merge pull request*/docs" && "Merge pull request*[Docs] Build by Sphinx for GitHub Pages")
if: |
!(startsWith(needs.check-commit.outputs.commit-message, 'Merge pull request') &&
Expand All @@ -70,15 +76,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: ${{ matrix.python-version }}

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv-${{ github.sha }}
key: ${{ runner.os }}-python-venv-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-venv-
${{ runner.os }}-python-venv-${{ matrix.python-version }}-

- name: Install dependencies
run: |
Expand Down Expand Up @@ -110,15 +116,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv-${{ github.sha }}
key: ${{ runner.os }}-python-venv-${{ env.PYTHON_VERSION }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-venv-
${{ runner.os }}-python-venv-${{ env.PYTHON_VERSION }}-

- name: Lint code
run: |
Expand All @@ -142,6 +148,9 @@ jobs:
test:
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -151,15 +160,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: ${{ matrix.python-version }}

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv-${{ github.sha }}
key: ${{ runner.os }}-python-venv-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-venv-
${{ runner.os }}-python-venv-${{ matrix.python-version }}-

- name: Run tests
env:
Expand All @@ -171,18 +180,19 @@ jobs:
sudo apt update
sudo apt install python3-opencv -y
pip install pytest pytest-cov
pytest --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
PYTHONPATH=. pytest --cov=zerohertzLib --cov-report=xml --junitxml=junit.xml -o junit_family=legacy

- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
flags: python3.11
flags: python${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
if: always()

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
flags: python${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
if: always()

Expand All @@ -209,15 +219,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv-${{ github.sha }}
key: ${{ runner.os }}-python-venv-${{ env.PYTHON_VERSION }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-venv-
${{ runner.os }}-python-venv-${{ env.PYTHON_VERSION }}-

- name: Align with latest branch
run: |
Expand Down Expand Up @@ -262,11 +272,11 @@ jobs:
echo "No changes in version, skipping commit."
else
git add zerohertzLib/__init__.py
git commit -m ":hammer: Update: Version (#${{ github.event.pull_request.number }})"
git commit -m ":hammer: update: version (#${{ github.event.pull_request.number }})"
fi
git add docs
git add sphinx/source
git commit -m ':memo: Docs: Build Sphinx (#${{ github.event.pull_request.number }})'
git commit -m ':memo: docs: build sphinx (#${{ github.event.pull_request.number }})'
git push origin docs
echo '{
"title": "[Docs] Build by Sphinx for GitHub Pages",
Expand Down
30 changes: 20 additions & 10 deletions .github/workflows/cicd-push-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ permissions:
contents: read
actions: read

env:
PYTHON_VERSION: "3.11"

jobs:
check-pr:
runs-on: ubuntu-latest
Expand All @@ -35,6 +38,9 @@ jobs:
build:
runs-on: ubuntu-latest
needs: [check-pr]
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
if: needs.check-pr.outputs.has-pr == 'false'
steps:
- name: Checkout repository
Expand All @@ -45,15 +51,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv-${{ github.sha }}
key: ${{ runner.os }}-python-venv-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-venv-
${{ runner.os }}-python-venv-${{ matrix.python-version }}-

- name: Install dependencies
run: |
Expand Down Expand Up @@ -85,15 +91,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv-${{ github.sha }}
key: ${{ runner.os }}-python-venv-${{ env.PYTHON_VERSION }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-venv-
${{ runner.os }}-python-venv-${{ env.PYTHON_VERSION }}-

- name: Lint code
run: |
Expand All @@ -117,6 +123,9 @@ jobs:
test:
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -126,15 +135,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv-${{ github.sha }}
key: ${{ runner.os }}-python-venv-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-venv-
${{ runner.os }}-python-venv-${{ matrix.python-version }}-

- name: Run tests
env:
Expand All @@ -146,7 +155,7 @@ jobs:
sudo apt update
sudo apt install python3-opencv -y
pip install pytest pytest-cov
pytest --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
PYTHONPATH=. pytest --cov=zerohertzLib --cov-report=xml --junitxml=junit.xml -o junit_family=legacy

- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
Expand All @@ -158,6 +167,7 @@ jobs:
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
flags: python3.11
token: ${{ secrets.CODECOV_TOKEN }}
if: always()

Expand Down
30 changes: 20 additions & 10 deletions .github/workflows/cicd-push-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,15 @@ permissions:
contents: write
actions: read

env:
PYTHON_VERSION: "3.11"

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
# [`master` Push] "Merge pull request*"
if: |
startsWith(github.event.head_commit.message, 'Merge pull request')
Expand All @@ -22,15 +28,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv-${{ github.sha }}
key: ${{ runner.os }}-python-venv-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-venv-
${{ runner.os }}-python-venv-${{ matrix.python-version }}-

- name: Install build tools
run: |
Expand Down Expand Up @@ -61,6 +67,9 @@ jobs:
test:
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -70,15 +79,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv-${{ github.sha }}
key: ${{ runner.os }}-python-venv-${{ matrix.python-version }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-venv-
${{ runner.os }}-python-venv-${{ matrix.python-version }}-

- name: Run tests
env:
Expand All @@ -90,7 +99,7 @@ jobs:
sudo apt update
sudo apt install python3-opencv -y
pip install pytest pytest-cov
pytest --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
PYTHONPATH=. pytest --cov=zerohertzLib --cov-report=xml --junitxml=junit.xml -o junit_family=legacy

- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
Expand All @@ -102,6 +111,7 @@ jobs:
- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
flags: python3.11
token: ${{ secrets.CODECOV_TOKEN }}
if: always()

Expand Down Expand Up @@ -166,15 +176,15 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: ${{ env.PYTHON_VERSION }}

- name: Cache virtualenv
uses: actions/cache@v4
with:
path: venv
key: ${{ runner.os }}-python-venv-${{ github.sha }}
key: ${{ runner.os }}-python-venv-${{ env.PYTHON_VERSION }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-python-venv-
${{ runner.os }}-python-venv-${{ env.PYTHON_VERSION }}-

- name: Download build artifacts
uses: actions/download-artifact@v4
Expand Down
Loading