Skip to content

Commit

Permalink
Merge pull request #4 from fish-shop/workflow-action-tests
Browse files Browse the repository at this point in the history
Add workflow tests
  • Loading branch information
marcransome authored May 26, 2021
2 parents e87b5db + ac14b5d commit 92d6770
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: tests
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- published
jobs:
tests:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install fish shell
uses: fish-actions/[email protected]
- name: Create syntactically valid fish shell function
run: |
cat << EOF >./valid-syntax.fish
function valid-syntax
echo "valid-syntax"
end
EOF
- if: github.event_name != 'pull_request'
name: Syntax check valid fish file using action from main branch
uses: fish-shop/syntax-check@main
with:
pattern: valid-syntax.fish
- if: github.event_name == 'pull_request'
name: Syntax check valid fish file using action from pull-request branch
uses: ./.
with:
pattern: valid-syntax.fish

0 comments on commit 92d6770

Please sign in to comment.