diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 3ffaa29..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Continuous Integration - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - - runs-on: macos-latest - - steps: - - uses: actions/checkout@v3 - - name: Test - run: swift test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f856c58 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: Test + +on: + push: + branches: + - main + paths: + - ".github/workflows/test.yml" + - "**/*.swift" + pull_request: + paths: + - ".github/workflows/test.yml" + - "**/*.swift" + +jobs: + test: + if: '!github.event.pull_request.merged' + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + - uses: swift-actions/setup-swift@v1 + - name: Check Swift Version + run: swift --version + - name: Run Tests + run: swift test -v