From 77f24b3946c55f62ff641c1660780737a3c138f7 Mon Sep 17 00:00:00 2001 From: Rongxin Liu Date: Sun, 18 May 2025 18:51:00 -0400 Subject: [PATCH] updated Python version to 3.13 in GitHub actions workflow --- .github/workflows/main.yml | 84 +++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0b0ee1a..7be7134 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,7 +10,7 @@ jobs: MYSQL_ALLOW_EMPTY_PASSWORD: yes options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 ports: - - 3306:3306 + - 3306:3306 postgres: image: postgres env: @@ -18,51 +18,51 @@ jobs: POSTGRES_PASSWORD: postgres POSTGRES_DB: test ports: - - 5432:5432 + - 5432:5432 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.7' - check-latest: true - - name: Setup databases - run: | - pip install . - pip install mysqlclient psycopg2-binary SQLAlchemy + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.13" + check-latest: true + - name: Setup databases + run: | + pip install . + pip install mysqlclient psycopg2-binary SQLAlchemy - - name: Run tests - run: python tests/sql.py - env: - MYSQL_HOST: 127.0.0.1 - POSTGRESQL_HOST: 127.0.0.1 + - name: Run tests + run: python tests/sql.py + env: + MYSQL_HOST: 127.0.0.1 + POSTGRESQL_HOST: 127.0.0.1 - - name: Install pypa/build - run: python -m pip install build --user + - name: Install pypa/build + run: python -m pip install build --user - - name: Build a binary wheel and a source tarball - run: python -m build --sdist --wheel --outdir dist/ . + - name: Build a binary wheel and a source tarball + run: python -m build --sdist --wheel --outdir dist/ . - - name: Deploy to PyPI - if: ${{ github.ref == 'refs/heads/main' }} - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + - name: Deploy to PyPI + if: ${{ github.ref == 'refs/heads/main' }} + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} - - name: Get Version - id: py_version - run: | - echo ::set-output name=version::$(python3 setup.py --version) + - name: Get Version + id: py_version + run: | + echo ::set-output name=version::$(python3 setup.py --version) - - name: Create Release - if: ${{ github.ref == 'refs/heads/main' }} - uses: actions/github-script@v7 - with: - github-token: ${{ github.token }} - script: | - github.rest.repos.createRelease({ - owner: context.repo.owner, - repo: context.repo.repo, - tag_name: "v${{ steps.py_version.outputs.version }}", - tag_commitish: "${{ github.sha }}" - }) + - name: Create Release + if: ${{ github.ref == 'refs/heads/main' }} + uses: actions/github-script@v7 + with: + github-token: ${{ github.token }} + script: | + github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: "v${{ steps.py_version.outputs.version }}", + tag_commitish: "${{ github.sha }}" + })