Bump pytz from 2023.4 to 2024.1 #240
Workflow file for this run
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
name: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
Testing: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.9", "3.10", "3.11", "3.12"] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Create virtual environment | |
run: | | |
python -m venv venv | |
- name: "Test Rust" | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
cargo test | |
- name: Install tzfpy and test(Windows) | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
source venv/Scripts/activate | |
python -m pip install --upgrade pip | |
pip install -r requirements_dev.txt | |
maturin develop --release --extras=pytz | |
pytest | tee benchmark_result.txt | |
- name: Install tzfpy and test(Ubuntu&macoS) | |
if: matrix.os != 'windows-latest' | |
shell: bash | |
run: | | |
source venv/bin/activate | |
pip install --upgrade pip | |
pip install -r requirements_dev.txt | |
maturin develop --release --extras=pytz | |
pytest | tee benchmark_result.txt | |
- name: Setup benchmark file name | |
id: gen-benchmark-file-name | |
shell: bash | |
run: | | |
echo "filename=tzfpy_benchmark_py_${{ matrix.python-version }}_${{ matrix.os }}.md" >> $GITHUB_OUTPUT | |
- name: Report | |
shell: bash | |
run: | | |
set +e | |
echo "## Python ${{ matrix.python-version }} with ${{ matrix.os }}" >> ${{ steps.gen-benchmark-file-name.outputs.filename }} | |
echo '```' >> ${{ steps.gen-benchmark-file-name.outputs.filename }} | |
cat benchmark_result.txt >> ${{ steps.gen-benchmark-file-name.outputs.filename }} | |
echo '```' >> ${{ steps.gen-benchmark-file-name.outputs.filename }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "benchmark_result_as_md_${{ matrix.python-version }}_${{ matrix.os }}" | |
path: ${{ steps.gen-benchmark-file-name.outputs.filename }} | |
Report: | |
needs: [Testing] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: "benchmark_result_as_md*" | |
- run: find . -name "*.md" -exec cat {} \; > $GITHUB_STEP_SUMMARY |