From f34c4be4213d7fc5cfe449980381c7bc7d7759f9 Mon Sep 17 00:00:00 2001 From: Nikita Vasilev Date: Fri, 13 Oct 2023 19:00:20 +0300 Subject: [PATCH] Update `workflows` --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5874abf --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: "objects-factory" + +on: + push: + branches: + - main + - dev + pull_request: + paths: + - '.swiftlint.yml' + branches: + - main + - dev + +concurrency: + group: ci + cancel-in-progress: true + +jobs: + SwiftLint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: GitHub Action for SwiftLint + uses: norio-nomura/action-swiftlint@3.2.1 + with: + args: --strict + env: + DIFF_BASE: ${{ github.base_ref }} + Latest: + name: Test Latest (iOS, macOS, tvOS, watchOS) + runs-on: macOS-12 + env: + DEVELOPER_DIR: "/Applications/Xcode_14.1.app/Contents/Developer" + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + include: + - destination: "OS=16.1,name=iPhone 14 Pro" + name: "iOS" + scheme: "ObjectsFactory" + sdk: iphonesimulator + steps: + - uses: actions/checkout@v3 + - name: ${{ matrix.name }} + run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "./${{ matrix.sdk }}.xcresult" + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3.1.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} + xcode: true + xcode_archive_path: "./${{ matrix.sdk }}.xcresult" \ No newline at end of file