Correctly handle platlib wheels #101
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
--- | |
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
python_version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
exclude: | |
# No Python 3.7 available on MacOS | |
- platform: macos-latest | |
python_version: 3.7 | |
runs-on: ${{ matrix.platform }} | |
name: test ${{ matrix.platform }} (py${{ matrix.python_version }}) | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "${{ matrix.python_version }}" | |
- name: Setup pip | |
run: | | |
python -m pip install --upgrade pip setuptools | |
- name: Install dependencies (py37) | |
run: | | |
pip install -r 3rdparty/requirements.37.txt --user | |
if: ${{ matrix.python_version == '3.7' }} | |
- name: Install dependencies | |
run: | | |
pip install -r 3rdparty/requirements.311.txt --user | |
if: ${{ matrix.python_version != '3.7' }} | |
- name: Run mypy | |
run: | | |
python -m mypy req_compile | |
env: | |
MYPYPATH: req-compile/stubs | |
- name: Run pylint | |
run: | | |
python -m pylint req_compile tests | |
- name: Test with pytest | |
run: | | |
python -m pytest -v --ignore=private | |
formatting: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r 3rdparty/requirements.311.txt --user | |
- name: Run black | |
run: | | |
black --check --diff req_compile | |
- name: Run isort | |
run: | | |
isort --check-only req_compile | |
bazel: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: ["ubuntu-latest", "macos-14", "windows-latest"] | |
runs-on: ${{ matrix.platform }} | |
name: bazel test --build ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v2 | |
# TODO(https://github.com/sputt/req-compile/issues/73): Fix buildbuddy | |
# - name: Configure Build Event Service | |
# run: | | |
# echo "common --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}" > "${CI_BAZELRC_PATH}" | |
# echo "common --config=bes" >> "${CI_BAZELRC_PATH}" | |
# echo "common --announce_rc" >> "${CI_BAZELRC_PATH}" | |
# env: | |
# CI_BAZELRC_PATH: .github/ci.bazelrc | |
- name: Run Tests | |
run: | | |
bazel test //... | |
- name: Perform compilation | |
run: | | |
bazel run //3rdparty:requirements_compiler "--" --upgrade | |
bazel_lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r 3rdparty/requirements.311.txt --user | |
pip install -e . | |
- name: Run isort | |
run: | | |
isort --check-only private | |
- name: Run black | |
run: | | |
black --check --diff private | |
- name: Run pylint | |
run: | | |
python -m pylint private | |
- name: Download Buildifier | |
run: | | |
wget "https://github.com/bazelbuild/buildtools/releases/download/v6.4.0/buildifier-linux-amd64" -O buildifier | |
chmod +x buildifier | |
- name: Buildifier | |
run: ./buildifier -lint=warn -mode=check -warnings=all -r ${{ github.workspace }} | |