From fe8b01805d3bbba4e8607fd80c3235ed5b974a4a Mon Sep 17 00:00:00 2001 From: mcmikius Date: Wed, 13 Dec 2023 14:28:53 +0200 Subject: [PATCH] ci: create test actions --- .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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..aa47862 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +# This workflow will build a Swift project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-swift + +name: Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Build + run: swift build -v + - name: Run tests + run: swift test -v + - name: Fetch Coverage + uses: sersoft-gmbh/swift-coverage-action@v4 + id: coverage-files + - name: Publish Coverage to Codecov + uses: codecov/codecov-action@v3 + with: + files: ${{ join(fromJSON(steps.coverage-files.outputs.files), ',') }}