From 3285135c4ec94136e17d6f849601a0c11aa6a871 Mon Sep 17 00:00:00 2001 From: Kevin Lundberg Date: Sat, 21 Sep 2024 00:19:37 -0400 Subject: [PATCH] Add action to test plugin on linux --- .github/workflows/test.yml | 43 +++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5344993..d39eed3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,24 +1,37 @@ name: CI -on: [push] +on: [push, pull_request] jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Run Shellcheck - run: shellcheck bin/* - - plugin-test: + - uses: actions/checkout@v4 + - name: Run Shellcheck + run: shellcheck bin/* + + plugin-test-macos: runs-on: macOS-latest steps: - - uses: actions/checkout@v1 - - name: Install ASDF - run: git clone https://github.com/asdf-vm/asdf.git $HOME/asdf - - name: Test plugin - env: - GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - . $HOME/asdf/asdf.sh - asdf plugin-test swiftlint $GITHUB_WORKSPACE 'swiftlint version' + - uses: actions/checkout@v4 + - name: Install ASDF + run: git clone https://github.com/asdf-vm/asdf.git $HOME/asdf + - name: Test plugin + env: + GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + . $HOME/asdf/asdf.sh + asdf plugin-test swiftlint $GITHUB_WORKSPACE 'swiftlint version' + + plugin-test-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install ASDF + run: git clone https://github.com/asdf-vm/asdf.git $HOME/asdf + - name: Test plugin + env: + GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + . $HOME/asdf/asdf.sh + asdf plugin-test swiftlint $GITHUB_WORKSPACE 'swiftlint version'