File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on :
4+ pull_request :
5+ branches : [main]
6+
7+ jobs :
8+ lint :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+ - uses : actions/setup-python@v5
13+ with :
14+ python-version : " 3.11"
15+ - run : pip install ruff black
16+ - run : ruff check fastapi_auth_kit/ tests/
17+ - run : black --check fastapi_auth_kit/ tests/
Original file line number Diff line number Diff line change 1+ name : Publish to PyPI
2+
3+ on :
4+ release :
5+ types : [published]
6+ workflow_dispatch :
7+ inputs :
8+ version :
9+ description : ' Version (e.g., 0.1.0)'
10+ required : true
11+ default : ' 0.1.0'
12+
13+ jobs :
14+ publish :
15+ runs-on : ubuntu-latest
16+ permissions :
17+ id-token : write
18+ steps :
19+ - uses : actions/checkout@v4
20+ - uses : actions/setup-python@v5
21+ with :
22+ python-version : " 3.12"
23+ - run : pip install build
24+ - if : github.event_name == 'workflow_dispatch'
25+ run : sed -i 's/version = ".*"/version = "${{ github.event.inputs.version }}"/' pyproject.toml
26+ - run : python -m build
27+ - uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 1+ name : Tests
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ jobs :
10+ test :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ python-version : ["3.9", "3.10", "3.11", "3.12"]
15+ steps :
16+ - uses : actions/checkout@v4
17+ - uses : actions/setup-python@v5
18+ with :
19+ python-version : ${{ matrix.python-version }}
20+ - run : pip install -e ".[dev]"
21+ - run : pytest tests/ -v
You can’t perform that action at this time.
0 commit comments