From 7745b7fbffed67ab319b6e4a01766d6c990d6cb4 Mon Sep 17 00:00:00 2001 From: Robert Martin Date: Sun, 1 Dec 2024 14:06:45 -0500 Subject: [PATCH] updated gh actions --- .github/workflows/codecov.yml | 65 ++++++++++++++++--------------- .github/workflows/main.yml | 73 +++++++++++++++++------------------ 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 270ad49..b5065c2 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -1,36 +1,37 @@ name: codecov on: - pull_request: - push: - branches: - - master + pull_request: + push: + branches: + - master jobs: - codecov: - name: py${{ matrix.python-version }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - env: - MPLBACKEND: Agg # https://github.com/orgs/community/discussions/26434 - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.12"] - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - - name: Install dependencies - run: | - pip install -r requirements.txt - - name: Generate coverage report - run: | - pip install pytest pytest-cov - pytest --cov=./ --cov-report=xml - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - files: ./coverage.xml - fail_ci_if_error: true \ No newline at end of file + codecov: + name: py${{ matrix.python-version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + env: + MPLBACKEND: Agg # https://github.com/orgs/community/discussions/26434 + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.12"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: "pip" + - name: Install dependencies + run: | + pip install -r requirements.txt + pip install ecos + - name: Generate coverage report + run: | + pip install pytest pytest-cov + pytest --cov=./ --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: ./coverage.xml + fail_ci_if_error: true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 75724ed..478bac0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,43 +5,42 @@ name: pytest on: push: - branches: [ "master" ] + branches: ["master"] pull_request: - branches: [ "master" ] + branches: ["master"] jobs: - pytest: - name: py${{ matrix.python-version }} on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - env: - MPLBACKEND: Agg # https://github.com/orgs/community/discussions/26434 - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - exclude: - - os: macos-latest - python-version: "3.8" - steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: 'pip' - - name: Install dependencies - run: | - pip install -r requirements.txt - pip install pytest isort black flake8 - - name: Test with pytest - run: | - pytest ./tests - - name: Check with isort - run: | - isort --check --diff . - - name: Check with black - run: | - black --check --diff . - - name: Check with flake8 - run: | - flake8 --show-source --statistics . + pytest: + name: py${{ matrix.python-version }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + env: + MPLBACKEND: Agg # https://github.com/orgs/community/discussions/26434 + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: "pip" + - name: Install dependencies + run: | + pip install -r requirements.txt + pip install pytest isort black flake8 + pip install ecos + - name: Test with pytest + run: | + pytest ./tests + - name: Check with isort + run: | + isort --check --diff . + - name: Check with black + run: | + black --check --diff . + - name: Check with flake8 + run: | + flake8 --show-source --statistics .