Skip to content

Commit

Permalink
chore: Remove old scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
sondrelg committed Feb 11, 2023
1 parent 56a5199 commit 1de12e4
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 214 deletions.
192 changes: 90 additions & 102 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,108 +7,96 @@ defaults:
shell: bash

jobs:
# # Make sure the action works using the default settings
# test-install:
# name: default ${{ matrix.poetry-version }} ${{ matrix.os }} ${{ matrix.python-version }}
# strategy:
# fail-fast: false
# matrix:
# os: [ ubuntu-latest, macos-latest, windows-latest ]
# python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
# poetry-version: [ "1.1.15", "1.2.2", "1.3.2" ]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v3
# - uses: ./
# with:
# version: "${{ matrix.poetry-version }}"
# - uses: actions/setup-python@v4
# with:
# python-version: "${{ matrix.python-version }}"
# - run: |
# poetry install --no-root --no-interaction
# poetry install --no-interaction
# poetry run pytest --version
#
# # Make sure the action sets config options correctly
# test-config-options:
# name: non-standard config - ${{ matrix.os }} ${{ matrix.python-version }}
# strategy:
# fail-fast: true
# matrix:
# os: [ ubuntu-latest, macos-latest, windows-latest ]
# python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: "${{ matrix.python-version }}"
# - uses: ./
# with:
# version: 1.3.2
# virtualenvs-create: false
# virtualenvs-in-project: true
# virtualenvs-path: ~/.cache/test
# installer-parallel: false
# - run: |
# source .github/scripts/assert.sh
# assert_in "1.3.2" "$(poetry --version)"
# assert_in "false" "$(poetry config virtualenvs.create)"
# assert_in "true" "$(poetry config virtualenvs.in-project)"
# assert_in "test" "$(poetry config virtualenvs.path)"
# assert_in "false" "$(poetry config installer.parallel)"
#
# # Check that installation-arguments works
# test-installation-arguments:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: ./
# with:
# installation-arguments: --git https://github.com/python-poetry/poetry.git@69bd6820e320f84900103fdf867e24b355d6aa5d
# - run: |
# source .github/scripts/assert.sh
# assert_in "1.1.9" "$(poetry --version)"
#
# # Retrieve the latest poetry version from PyPI
# check-latest:
# runs-on: ubuntu-latest
# outputs:
# latest-poetry-version: ${{ steps.fetch.outputs.version }}
# steps:
# - name: Fetch the latest Poetry version from PyPI
# id: fetch
# run: echo "::set-output name=version::$(python -c "import requests;response = requests.get(f'https://pypi.org/pypi/poetry/json');latest_version = response.json()['info']['version'];print(latest_version)")"
#
# # Make sure the action installs the latest version by default
# test-latest-version-when-unspecified:
# needs: check-latest
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: ./
# - run: |
# source .github/scripts/assert.sh
# assert_in "." "${{ needs.check-latest.outputs.latest-poetry-version }}"
# assert_in "${{ needs.check-latest.outputs.latest-poetry-version }}" "$(poetry --version)"
#
# # Make sure we're able to run the action with both major and minor versions
# test-major-and-minor-versions:
# runs-on: ubuntu-latest
# steps:
# - uses: snok/install-poetry@v1
# - uses: snok/install-poetry@v1.1
# - uses: snok/install-poetry@v1.2
# Make sure the action works using the default settings
test-install:
name: default ${{ matrix.poetry-version }} ${{ matrix.os }} ${{ matrix.python-version }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
poetry-version: [ "1.1.15", "1.2.2", "1.3.2" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ./
with:
version: "${{ matrix.poetry-version }}"
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- run: |
poetry install --no-root --no-interaction
poetry install --no-interaction
poetry run pytest --version
# Make sure the action sets config options correctly
test-config-options:
name: non-standard config - ${{ matrix.os }} ${{ matrix.python-version }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- uses: ./
with:
version: 1.3.2
virtualenvs-create: false
virtualenvs-in-project: true
virtualenvs-path: ~/.cache/test
installer-parallel: false
- run: |
source .github/scripts/assert.sh
assert_in "1.3.2" "$(poetry --version)"
assert_in "false" "$(poetry config virtualenvs.create)"
assert_in "true" "$(poetry config virtualenvs.in-project)"
assert_in "test" "$(poetry config virtualenvs.path)"
assert_in "false" "$(poetry config installer.parallel)"
# Check that installation-arguments works
test-installation-arguments:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
with:
installation-arguments: --git https://github.com/python-poetry/poetry.git@69bd6820e320f84900103fdf867e24b355d6aa5d
- run: |
source .github/scripts/assert.sh
assert_in "1.1.9" "$(poetry --version)"
# Retrieve the latest poetry version from PyPI
check-latest:
runs-on: ubuntu-latest
outputs:
latest-poetry-version: ${{ steps.fetch.outputs.version }}
steps:
- name: Fetch the latest Poetry version from PyPI
id: fetch
run: echo "::set-output name=version::$(python -c "import requests;response = requests.get(f'https://pypi.org/pypi/poetry/json');latest_version = response.json()['info']['version'];print(latest_version)")"

# Make sure the action installs the latest version by default
test-latest-version-when-unspecified:
needs: check-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./
- run: |
source .github/scripts/assert.sh
assert_in "." "${{ needs.check-latest.outputs.latest-poetry-version }}"
assert_in "${{ needs.check-latest.outputs.latest-poetry-version }}" "$(poetry --version)"
# Legacy: make sure old scripts are not deleted
# The scripts folder contains scripts that are fetched by older versions of the
# action. They're unfortunately fetched from the main branch.
# If we delete these scripts, those versions of the action will fail.
test-scripts-exist:
# Make sure we're able to run the action with both major and minor versions
test-major-and-minor-versions:
runs-on: ubuntu-latest
steps:
# v1.1 script loaded in < 1.1.4
- uses: snok/install-poetry@v1.1.4
# v1.2 script loaded in > 1.1.4
- uses: snok/install-poetry@v1.1.6
- uses: snok/install-poetry@v1
- uses: snok/install-poetry@v1.1
- uses: snok/install-poetry@v1.2
4 changes: 0 additions & 4 deletions scripts/README.md

This file was deleted.

45 changes: 0 additions & 45 deletions scripts/v1.1/main.sh

This file was deleted.

63 changes: 0 additions & 63 deletions scripts/v1.2/main.sh

This file was deleted.

0 comments on commit 1de12e4

Please sign in to comment.