Merge pull request #2 from wusatosi/dependabot/github_actions/actions… #35
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: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, reopened] | |
permissions: | |
issues: write | |
jobs: | |
Fresh-Install: | |
name: Fresh Install gh | |
runs-on: ubuntu-latest | |
# This image will be pulled from docker, | |
# therefore, it will (likely) not include gh | |
container: ubuntu:latest | |
steps: | |
- name: Ensure gh is not installed | |
run: type -p gh >/dev/null && exit 1 || echo "looks good" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Invoke | |
uses: ./ | |
- name: Test | |
shell: bash | |
run: | | |
gh --help && | |
test $GH_REPO == ${{ github.repository }} && | |
test $GH_TOKEN == ${{ github.token }} && env | |
- name: Use gh | |
shell: bash | |
run: gh issue comment 1 -b "Integration test commit ${{ github.workflow }} @ ${{ github.sha }}, fresh install" | |
Already-Installed: | |
name: Test already installed gh | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Invoke | |
uses: ./ | |
- name: Test | |
shell: bash | |
run: | | |
gh --help && | |
test $GH_REPO == ${{ github.repository }} && | |
test $GH_TOKEN == ${{ github.token }} && env | |
- name: Use gh | |
shell: bash | |
run: gh issue comment 1 -b "Integration test commit ${{ github.workflow }} @ ${{ github.sha }}, ${{ matrix.os }}" |