Skip to content

Commit e487984

Browse files
authored
Merge pull request #9 from Code0x58/codex/remove-codacy-links-and-update-github-actions
Align CI workflows with stripzip
2 parents bb9e242 + 1a7b82e commit e487984

File tree

3 files changed

+65
-36
lines changed

3 files changed

+65
-36
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- master
8+
pull_request:
9+
10+
jobs:
11+
tests:
12+
runs-on: ubuntu-latest
13+
env:
14+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version:
19+
- "3.8"
20+
- "3.9"
21+
- "3.10"
22+
- "3.11"
23+
- "3.12"
24+
- "3.13"
25+
- "3.14"
26+
- "pypy-3.9"
27+
steps:
28+
- name: Check out repository
29+
uses: actions/checkout@v4
30+
31+
- name: Set up Python ${{ matrix.python-version }}
32+
uses: actions/setup-python@v5
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
36+
- name: Install system dependencies
37+
run: |
38+
sudo apt-get update
39+
sudo apt-get install -y zip p7zip-full
40+
41+
- name: Install Python dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install . pytest pytest-cov
45+
46+
- name: Run tests
47+
run: pytest -vv --cov=jsonstore --cov-report=xml --junitxml=test-results.xml
48+
49+
- name: Upload coverage to Codecov
50+
if: always() && env.CODECOV_TOKEN != ''
51+
uses: codecov/codecov-action@v5
52+
with:
53+
token: ${{ env.CODECOV_TOKEN }}
54+
files: ./coverage.xml
55+
fail_ci_if_error: true
56+
57+
- name: Upload test results to Codecov
58+
if: always() && env.CODECOV_TOKEN != ''
59+
uses: codecov/codecov-action@v5
60+
with:
61+
token: ${{ env.CODECOV_TOKEN }}
62+
files: ./test-results.xml
63+
report_type: test_results
64+
fail_ci_if_error: true

.github/workflows/publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
run: |
2323
python -m pip install --upgrade pip build
2424
python -m build
25-
# the publishing uses PyPI's trusted publishing, so configured on pypi instead of using secrets
25+
# the publishing uses PyPI's trusted publishing, so configured on pypi instead of using secrets
2626
- name: Publish to PyPI
2727
uses: pypa/gh-action-pypi-publish@release/v1
28-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

.github/workflows/test.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)