From 009a0c6cbc6f24db81187db5e854da7b97a481b1 Mon Sep 17 00:00:00 2001 From: taoufik07 Date: Sun, 12 Nov 2023 00:00:37 +0100 Subject: [PATCH] update CI workflows --- .github/workflows/lint.yaml | 21 ++++++++------------- .github/workflows/test.yaml | 20 ++++++++++---------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 4f68faa7..bc9163ab 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,23 +1,18 @@ name: Lint -on: [push, pull_request] +on: + pull_request: + push: jobs: - build: + lint: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: - python-version: 3.7 - - - name: Install dependencies - run: | - python -m pip install pipenv - pipenv install --dev --system + python-version: "3.10" - - name: Lint - run: pre-commit run --all-files --show-diff-on-failure + - uses: pre-commit/action@v3.0.0 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3c36b880..0b0892ee 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -3,28 +3,28 @@ name: Test on: [push, pull_request] jobs: - build: - runs-on: ${{ matrix.os }} + test: + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8, 3.9] - os: [ubuntu-latest, macos-latest] + python-version: [3.6, 3.7, 3.8, 3.9, "3.10"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: 'pipenv' - name: Install dependencies run: | - python -m pip install pipenv - pipenv install --dev --system + python -m pip install --upgrade pip + python -m pip install --upgrade pipenv + pipenv install --dev - name: Tests run: | - python --version - pytest + pipenv run pytest