-
Notifications
You must be signed in to change notification settings - Fork 485
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1542 from vacanza/beta
v0.36
- Loading branch information
Showing
99 changed files
with
6,124 additions
and
569 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,56 @@ | ||
name: Tests | ||
on: [merge_group, push, pull_request, workflow_dispatch] | ||
name: CI/CD | ||
on: | ||
- merge_group | ||
- pull_request | ||
- push | ||
- workflow_dispatch | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
concurrency: | ||
cancel-in-progress: true | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
|
||
jobs: | ||
pre-commit: | ||
name: Run Quality Assurance | ||
name: Run pre-commit | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Out Repository | ||
- name: Check out Repository | ||
uses: actions/checkout@v4 | ||
- name: Set Up Python | ||
|
||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
python-version: '3.11' | ||
|
||
- name: Run pre-commit | ||
uses: pre-commit/[email protected] | ||
|
||
test: | ||
name: 'Test: Python=${{ matrix.python-version }} on ${{ matrix.os }}' | ||
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
needs: [pre-commit] | ||
needs: | ||
- pre-commit | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macOS-latest] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', 'pypy-3.8'] | ||
|
||
os: | ||
- macOS-latest | ||
- ubuntu-latest | ||
- windows-latest | ||
python-version: | ||
- '3.8' | ||
- '3.9' | ||
- '3.10' | ||
- '3.11' | ||
- '3.12' | ||
- 'pypy-3.9' | ||
- 'pypy-3.10' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set Up Python ${{ matrix.python-version }} | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
cache: pip | ||
|
@@ -38,70 +59,82 @@ jobs: | |
requirements/tests.txt | ||
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: true | ||
- name: Install Dependencies | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade --requirement requirements/tests.txt | ||
python -m pip install . | ||
- name: Run Tests | ||
- name: Run tests | ||
run: | | ||
make test | ||
- name: Upload Coverage | ||
- name: Upload coverage | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
flag-name: tests-${{ matrix.python-version }}-${{ matrix.os }} | ||
parallel: true | ||
path-to-lcov: coverage.lcov | ||
|
||
build: | ||
name: Build Distribution | ||
needs: [test] | ||
name: Build distribution | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set Up Python | ||
|
||
- name: Set up Python | ||
uses: actions/[email protected] | ||
with: | ||
cache: pip | ||
cache-dependency-path: requirements/runtime.txt | ||
python-version: '3.11' | ||
- name: Install Dependencies | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade build polib | ||
pip install . | ||
- name: Build Distribution | ||
- name: Build distribution | ||
run: | | ||
make package | ||
- name: Upload Package Artifacts | ||
- name: Upload package artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
|
||
coveralls: | ||
name: Finish Coveralls | ||
needs: [test] | ||
finish-coveralls: | ||
name: Finish coveralls | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Finished | ||
uses: coverallsapp/github-action@v2 | ||
with: | ||
parallel-finished: true | ||
|
||
deploy: | ||
name: Deploy | ||
publish-pypi-main: | ||
name: Publish to PyPI | ||
if: | | ||
github.repository == 'vacanza/python-holidays' && | ||
github.event_name == 'push' && | ||
startsWith(github.event.ref, 'refs/tags/v') | ||
environment: main | ||
needs: | ||
- build | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
needs: [build] | ||
steps: | ||
- name: Get Package Artifacts | ||
- name: Get package artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
path: dist | ||
- name: Publish Package | ||
uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_password }} | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.