-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Comment back tests, and expand matrix for non-default tests
- Loading branch information
Showing
2 changed files
with
129 additions
and
176 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,193 +7,146 @@ defaults: | |
shell: bash | ||
|
||
jobs: | ||
failing: | ||
runs-on: windows-latest | ||
|
||
# Make sure the action works using the default settings | ||
test-install: | ||
name: default ${{ matrix.poetry-version }} ${{ 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.0-rc.2" ] | ||
poetry-version: [ "1.1.14", "1.2.2" ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: ./ | ||
with: | ||
python-version: 3.8 | ||
- uses: snok/install-poetry@main | ||
version: "${{ matrix.poetry-version }}" | ||
- uses: actions/setup-python@v4 | ||
with: | ||
version: 1.2.1 | ||
virtualenvs-create: false | ||
python-version: "${{ matrix.python-version }}" | ||
- run: | | ||
poetry install --no-root --no-interaction | ||
poetry install --no-interaction | ||
poetry run pytest --version | ||
working-0: | ||
runs-on: windows-latest | ||
# Make sure the action sets config options correctly | ||
test-config-options: | ||
name: Set non-standard config options - ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11.0-rc.2" ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
python-version: "${{ matrix.python-version }}" | ||
- uses: ./ | ||
with: | ||
version: 1.2.1 | ||
virtualenvs-create: false | ||
virtualenvs-in-project: true | ||
virtualenvs-path: ~/.cache/test | ||
installer-parallel: false | ||
- run: | | ||
source .github/scripts/assert.sh | ||
assert_in "1.2.1" "$(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)" | ||
working-1: | ||
runs-on: windows-latest | ||
# Make sure that install dir matches expectations | ||
test-venv-in-project: | ||
name: Check in-project install dir - ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./ | ||
with: | ||
virtualenvs-in-project: true | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
python-version: "3.10" | ||
- run: | | ||
source .github/scripts/assert.sh | ||
echo "Test actual installation directory matches expectations" | ||
output="$(poetry install)" | ||
assert_in "/install-poetry/install-poetry/.venv" "$output" | ||
echo "..and test that we can source the dir, just to double check" | ||
source $VENV | ||
pytest --version | ||
# Check that installation-arguments works | ||
test-installation-arguments: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./ | ||
with: | ||
version: 1.2.1 | ||
virtualenvs-create: true | ||
installation-arguments: --git https://github.com/python-poetry/poetry.git@69bd6820e320f84900103fdf867e24b355d6aa5d | ||
- run: | | ||
source .github/scripts/assert.sh | ||
assert_in "1.1.9" "$(poetry --version)" | ||
working-2: | ||
runs-on: windows-latest | ||
# Retrieve latest poetry version from PyPI | ||
check-latest: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
latest-poetry-version: ${{ steps.fetch.outputs.version }} | ||
steps: | ||
- name: Fetch 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 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: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
- uses: ./ | ||
with: | ||
version: 1.2.2 | ||
virtualenvs-create: false | ||
- 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 the action works using the default settings | ||
# test-install: | ||
# name: default ${{ matrix.poetry-version }} ${{ 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.0-rc.2" ] | ||
# poetry-version: [ "1.1.14", "1.2.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: Set non-standard config options - ${{ matrix.os }} | ||
# strategy: | ||
# fail-fast: true | ||
# matrix: | ||
# os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
# runs-on: ${{ matrix.os }} | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: "3.10" | ||
# - uses: ./ | ||
# with: | ||
# version: 1.2.1 | ||
# virtualenvs-create: false | ||
# virtualenvs-in-project: true | ||
# virtualenvs-path: ~/.cache/test | ||
# installer-parallel: false | ||
# - run: | | ||
# source .github/scripts/assert.sh | ||
# assert_in "1.2.1" "$(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)" | ||
# | ||
# | ||
# | ||
# # Make sure that install dir matches expectations | ||
# test-venv-in-project: | ||
# name: Check in-project install dir - ${{ matrix.os }} | ||
# strategy: | ||
# fail-fast: true | ||
# matrix: | ||
# os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
# runs-on: ${{ matrix.os }} | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: ./ | ||
# with: | ||
# virtualenvs-in-project: true | ||
# - uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: "3.10" | ||
# - run: | | ||
# source .github/scripts/assert.sh | ||
# | ||
# echo "Test actual installation directory matches expectations" | ||
# output="$(poetry install)" | ||
# assert_in "/install-poetry/install-poetry/.venv" "$output" | ||
# | ||
# echo "..and test that we can source the dir, just to double check" | ||
# source $VENV | ||
# pytest --version | ||
# | ||
# | ||
# | ||
# # 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 latest poetry version from PyPI | ||
# check-latest: | ||
# runs-on: ubuntu-latest | ||
# outputs: | ||
# latest-poetry-version: ${{ steps.fetch.outputs.version }} | ||
# steps: | ||
# - name: Fetch 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 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/[email protected] | ||
# - uses: snok/[email protected] | ||
# | ||
# # 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: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# # v1.1 script loaded in < 1.1.4 | ||
# - uses: snok/[email protected] | ||
# # v1.2 script loaded in > 1.1.4 | ||
# - uses: snok/[email protected] | ||
# 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/[email protected] | ||
- uses: snok/[email protected] | ||
|
||
# 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: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# v1.1 script loaded in < 1.1.4 | ||
- uses: snok/[email protected] | ||
# v1.2 script loaded in > 1.1.4 | ||
- uses: snok/[email protected] |