chore(deps): bump google-github-actions/release-please-action (#6) #31
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
name: Tests suite for "setup-scalingo" | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
# Test that the action installs the CLI | |
# and that the scalingo CLI returns its version number | |
test-latest-version: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-latest, macos-11, macos-12] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup scalingo CLI | |
uses: ./ | |
with: | |
region: 'osc-fr1' | |
- name: Check version | |
run: | | |
# given | |
latest_version=$(curl -sL https://cli-dl.scalingo.com/version) | |
# when | |
installed_version=$(scalingo --version) | |
# then | |
echo $latest_version | |
echo $installed_version | |
echo "${installed_version}" | grep -q "${latest_version}" | |
# Test that the action installs a specific version of the CLI | |
# and that the scalingo CLI returns its version number | |
test-specific-version: | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-latest, macos-11, macos-12] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup scalingo CLI | |
uses: ./ | |
with: | |
version: 1.28.1 | |
region: 'osc-fr1' | |
- name: Check version | |
run: | | |
# given | |
wanted_version=1.28.1 | |
# when | |
installed_version=$(scalingo --version) | |
# then | |
echo "${installed_version}" | grep -q "${wanted_version}" | |
# Test that the installed CLI is logged when the API Token is provided | |
test-login: | |
if: ${{ github.repository == 'scalingo-community/setup-scalingo' }} | |
strategy: | |
matrix: | |
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-latest, macos-11, macos-12] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup scalingo CLI | |
uses: ./ | |
with: | |
region: 'osc-fr1' | |
api_token: ${{ secrets.SCALINGO_API_TOKEN }} | |
- name: Check login | |
run: | | |
# given | |
expected_username="${{ secrets.SCALINGO_USERNAME }}" | |
# when | |
logged_user=$(scalingo whoami) | |
# then | |
echo "${logged_user}" | grep -q "${expected_username}" |