-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests, using GitHub Actions. (#7)
* Add tests, using GitHub Actions. * Change workflow run on PRs to main branch.
- Loading branch information
Showing
3 changed files
with
96 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: 'Tests: Version' | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
php-version: | ||
required: false | ||
type: number | ||
default: 8 | ||
terminus-version: | ||
required: false | ||
type: string | ||
default: 3.0.6 | ||
|
||
jobs: | ||
test_version: | ||
runs-on: ubuntu-latest | ||
name: ${{ inputs.terminus-version }} | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ inputs.php-version }} | ||
|
||
- name: Setup Terminus | ||
uses: ./ | ||
with: | ||
terminus-version: ${{ inputs.terminus-version }} | ||
|
||
- name: Expect to be version ${{ inputs.terminus-version }} | ||
run: | | ||
terminus -V --no-ansi | ||
if [[ $(terminus -V --no-ansi) != *"${{ inputs.terminus-version }}" ]]; then exit 1; fi | ||
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: WIP Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test_terminus: | ||
runs-on: ubuntu-latest | ||
name: Terminus Setup | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Terminus | ||
uses: ./ | ||
|
||
- name: Expect terminus command to be available | ||
run: terminus -V | ||
|
||
- name: Expect terminus to print art | ||
run: terminus art | ||
|
||
test_terminus_login: | ||
runs-on: ubuntu-latest | ||
name: Terminus Login | ||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Terminus | ||
uses: ./ | ||
with: | ||
pantheon-machine-token: ${{ secrets.PANTHEON_MACHINE_TOKEN }} | ||
|
||
- name: Expect to be logged in | ||
run: terminus whoami --no-ansi > /dev/null | ||
|
||
test_terminus_version: | ||
name: Terminus Version | ||
uses: ./.github/workflows/test-terminus-version.yml | ||
|
||
test_terminus_version_304: | ||
name: Terminus Version | ||
uses: ./.github/workflows/test-terminus-version.yml | ||
with: | ||
terminus-version: 3.0.4 | ||
|
||
test_terminus_version_266: | ||
name: Terminus Version | ||
uses: ./.github/workflows/test-terminus-version.yml | ||
with: | ||
php-version: 7.4 | ||
terminus-version: 2.6.6 |
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