From ac14b5d8f48d2e1e7a07910b941e4927be8c624d Mon Sep 17 00:00:00 2001 From: Marc Ransome Date: Wed, 26 May 2021 21:59:11 +0100 Subject: [PATCH] Add workflow tests --- .github/workflows/test.yml | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1603642 --- /dev/null +++ b/.github/workflows/test.yml @@ -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/install-fish@v1.1.0 + - 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