diff options
author | staticdev <staticdev-support@protonmail.com> | 2022-11-21 18:34:57 +0100 |
---|---|---|
committer | staticdev <staticdev-support@protonmail.com> | 2022-12-11 15:44:07 +0100 |
commit | 074dbd3b233538cbdc4ec9bb148f108cfcf94dc2 (patch) | |
tree | 978209df34700ce7195332731d3009311454325a | |
parent | ed49e7f4879e50c600bd505f14993cd3fff7a3a4 (diff) | |
download | isort-074dbd3b233538cbdc4ec9bb148f108cfcf94dc2.tar.gz |
Make steps consistent accross workflows
-rw-r--r-- | .github/workflows/integration.yml | 22 | ||||
-rw-r--r-- | .github/workflows/lint.yml | 22 | ||||
-rw-r--r-- | .github/workflows/release.yml | 2 | ||||
-rw-r--r-- | .github/workflows/tests.yml (renamed from .github/workflows/test.yml) | 40 |
4 files changed, 57 insertions, 29 deletions
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index b5bc7295..262d69aa 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -7,10 +7,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8"] + python-version: ["3.9"] steps: - - uses: actions/checkout@v2 + - name: Check out the repository + uses: actions/checkout@v3 + with: + fetch-depth: 2 - name: pip cache uses: actions/cache@v2 @@ -25,11 +28,18 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Upgrade pip + run: | + pip install --constraint=.github/workflows/constraints.txt pip + pip --version + + - name: Install Poetry run: | - python -m pip install --upgrade pip - python -m pip install --upgrade poetry - poetry install + pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry + poetry --version + + - name: Install dependencies + run: poetry install - name: Test integration run: ./scripts/test_integration.sh diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 22f2f854..77c752f1 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,10 +7,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8"] + python-version: ["3.9"] steps: - - uses: actions/checkout@v2 + - name: Check out the repository + uses: actions/checkout@v3 + with: + fetch-depth: 2 - name: pip cache uses: actions/cache@v2 @@ -25,11 +28,18 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Upgrade pip + run: | + pip install --constraint=.github/workflows/constraints.txt pip + pip --version + + - name: Install Poetry run: | - python -m pip install --upgrade pip - python -m pip install --upgrade poetry - poetry install + pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry + poetry --version + + - name: Install dependencies + run: poetry install # Temporaryly disabled due to circular depencies # - name: Lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index abd88388..45c83142 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.11" + python-version: "3.9" - name: Upgrade pip run: | diff --git a/.github/workflows/test.yml b/.github/workflows/tests.yml index 31e9d4dd..0108675b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/tests.yml @@ -3,25 +3,27 @@ name: Test on: [push, pull_request] jobs: - build: + tests: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python: ["3.6", "3.7", "3.8", "3.9", "3.10"] os: [ubuntu-latest, ubuntu-18.04, macos-latest, windows-latest] steps: - - uses: actions/checkout@v2 + - name: Check out the repository + uses: actions/checkout@v3 + - name: Ubuntu cache uses: actions/cache@v2 if: startsWith(matrix.os, 'ubuntu') with: path: ~/.cache/pip key: - ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} + ${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('**/pyproject.toml') }} restore-keys: | - ${{ matrix.os }}-${{ matrix.python-version }}- + ${{ matrix.os }}-${{ matrix.python }}- - name: macOS cache uses: actions/cache@v2 @@ -29,9 +31,9 @@ jobs: with: path: ~/Library/Caches/pip key: - ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} + ${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('**/pyproject.toml') }} restore-keys: | - ${{ matrix.os }}-${{ matrix.python-version }}- + ${{ matrix.os }}-${{ matrix.python }}- - name: Windows cache uses: actions/cache@v2 @@ -39,19 +41,24 @@ jobs: with: path: c:\users\runneradmin\appdata\local\pip\cache key: - ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }} + ${{ matrix.os }}-${{ matrix.python }}-${{ hashFiles('**/pyproject.toml') }} restore-keys: | - ${{ matrix.os }}-${{ matrix.python-version }}- + ${{ matrix.os }}-${{ matrix.python }}- - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python }} + + - name: Upgrade pip + run: | + pip install --constraint=.github/workflows/constraints.txt pip + pip --version - - name: Install poetry + - name: Install Poetry run: | - python -m pip install --upgrade pip - python -m pip install --upgrade poetry + pipx install --pip-args=--constraint=.github/workflows/constraints.txt poetry + poetry --version - name: Install dependencies run: poetry install @@ -61,6 +68,7 @@ jobs: run: | poetry run pytest tests/unit/ -s --cov=isort/ --cov-report=term-missing ${@-} poetry run coverage xml + - name: Report Coverage - if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.9' uses: codecov/codecov-action@v1 |