Skip to content

Commit

Permalink
lint actions, require 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaume committed Apr 8, 2024
1 parent c323b72 commit 2c8c3e5
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 66 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies and build
run: |
python3 -m pip install --upgrade pip build
cd mpcontribs-client
python3 -m build --outdir ../dist
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.10
- name: Install dependencies and build
run: |
python3 -m pip install --upgrade pip build
cd mpcontribs-client
python3 -m build --outdir ../dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: ./dist/
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: ./dist/
88 changes: 44 additions & 44 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,51 +20,51 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
python-version: ['3.8', '3.9', '3.10']
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip build pip-tools
python${{ matrix.python-version }} -m piptools compile --resolver=backtracking --extra dev -o requirements.txt mpcontribs-client/setup.py mpcontribs-api/setup.py
python${{ matrix.python-version }} -m pip install -r requirements.txt
cd mpcontribs-api && python${{ matrix.python-version }} -m pip install --no-deps .
- name: Set SSL_CERT_FILE (Linux)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
export SSL_CERT_FILE=$(python${{ matrix.python-version }} -m certifi)
echo "SSL_CERT_FILE=$SSL_CERT_FILE" >> $GITHUB_ENV
- name: Set SSL_CERT_FILE (Windows)
if: matrix.os == 'windows-latest'
run: |
$env:SSL_CERT_FILE=$(python${{ matrix.python-version }} -m certifi)
echo "SSL_CERT_FILE=$env:SSL_CERT_FILE" >> $GITHUB_ENV
- name: Test Client and build
env:
MPCONTRIBS_API_KEY: ${{ secrets.MPCONTRIBS_API_KEY }}
SSL_CERT_FILE: ${{ env.SSL_CERT_FILE }}
shell: bash
run: |
cd mpcontribs-client
python${{ matrix.python-version }} -m flake8 --max-line-length 100
python${{ matrix.python-version }} -m pycodestyle --max-line-length 100 .
python${{ matrix.python-version }} -m pytest -v -s --cov=mpcontribs/client --cov-report=term-missing --cov-report=xml --ignore=bravado
python${{ matrix.python-version }} -m build --outdir ../dist
- name: Publish distribution 📦s to Test PyPI
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
skip_existing: true
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python${{ matrix.python-version }} -m pip install --upgrade pip build pip-tools
python${{ matrix.python-version }} -m piptools compile --resolver=backtracking --extra dev -o requirements.txt mpcontribs-client/setup.py mpcontribs-api/setup.py
python${{ matrix.python-version }} -m pip install -r requirements.txt
cd mpcontribs-api && python${{ matrix.python-version }} -m pip install --no-deps .
- name: Set SSL_CERT_FILE (Linux)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
export SSL_CERT_FILE=$(python${{ matrix.python-version }} -m certifi)
echo "SSL_CERT_FILE=$SSL_CERT_FILE" >> $GITHUB_ENV
- name: Set SSL_CERT_FILE (Windows)
if: matrix.os == 'windows-latest'
run: |
$env:SSL_CERT_FILE=$(python${{ matrix.python-version }} -m certifi)
echo "SSL_CERT_FILE=$env:SSL_CERT_FILE" >> $GITHUB_ENV
- name: Test Client and build
env:
MPCONTRIBS_API_KEY: ${{ secrets.MPCONTRIBS_API_KEY }}
SSL_CERT_FILE: ${{ env.SSL_CERT_FILE }}
shell: bash
run: |
cd mpcontribs-client
python${{ matrix.python-version }} -m flake8 --max-line-length 100
python${{ matrix.python-version }} -m pycodestyle --max-line-length 100 .
python${{ matrix.python-version }} -m pytest -v -s --cov=mpcontribs/client --cov-report=term-missing --cov-report=xml --ignore=bravado
python${{ matrix.python-version }} -m build --outdir ../dist
- name: Publish distribution 📦s to Test PyPI
if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.10
uses: pypa/gh-action-pypi-publish@release/v1.5
with:
skip_existing: true
password: ${{ secrets.test_pypi_password }}
repository_url: https://test.pypi.org/legacy/

auto-gen-release:
needs:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/upgrade-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,31 @@ on:
workflow_dispatch: # Allow running on-demand
schedule:
# Runs every Monday at 8:00 UTC (4:00 Eastern)
- cron: '0 8 * * 1'
- cron: "0 8 * * 1"

jobs:
upgrade:
name: ${{ matrix.package }} (${{ matrix.os }}/py${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
package: ["mpcontribs-kernel-gateway", "mpcontribs-client", "mpcontribs-api", "mpcontribs-portal"]
python-version: ["3.8", "3.9", "3.10"]
os: ["ubuntu-latest"]
package:
[
"mpcontribs-kernel-gateway",
"mpcontribs-client",
"mpcontribs-api",
"mpcontribs-portal",
]
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache: "pip"
- name: Upgrade Python dependencies
shell: bash
run: |
Expand Down

0 comments on commit 2c8c3e5

Please sign in to comment.