Skip to content

Commit

Permalink
updates for CI (#96)
Browse files Browse the repository at this point in the history
updated Github Actions configs. fixed CodeQL step params
  • Loading branch information
ypopovych authored Apr 8, 2024
1 parent bee8d4c commit 707a25e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 31 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/codeQL.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# 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: CodeQL

on:
Expand All @@ -20,11 +17,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # 2.3.4
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@1a927e9307bc11970b2c679922ebc4d03a5bd980 # 1.0.31
uses: github/codeql-action/init@v3
with:
languages: 'swift'
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -36,17 +33,20 @@ jobs:
run: make build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@1a927e9307bc11970b2c679922ebc4d03a5bd980 # 1.0.31
uses: github/codeql-action/analyze@v3
with:
output: "results"
upload: "never"

- name: upload_artifact
uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 # 2.3.1
- name: Upload SARIF report to Artifacts
uses: actions/upload-artifact@v4
with:
name: CodeQL Analysis Sarif
name: CodeQL Analysis SARIF
path: ${{ github.workspace }}/results/swift.sarif

- name: Upload SARIF report to DDOG
env:
DD_API_KEY: '${{ secrets.DD_API_KEY }}'
run: |
npm install -g @datadog/datadog-ci
datadog-ci sarif upload "${{ github.workspace }}/results/swift.sarif" --service dd-sdk-swift-testing --env ci
env:
DD_API_KEY: '${{secrets.DD_API_KEY}}'
6 changes: 3 additions & 3 deletions .github/workflows/createRelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ jobs:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Select Xcode 14
run: sudo xcode-select --switch /Applications/Xcode_14.1.app
- name: Test
run: make tests
run: make tests/pretty

release:
needs: [test]
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Select Xcode 14
run: sudo xcode-select --switch /Applications/Xcode_14.1.app
- name: Build and upload XCFrameworks, recreate tag
Expand Down
27 changes: 10 additions & 17 deletions .github/workflows/integrationTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ on:
workflow_dispatch:

jobs:

test-13-Integration-build:
test-13-Integration-Unit:
name: Run Tests macOS 13.0
runs-on: macos-13
strategy:
Expand All @@ -17,43 +16,37 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install xcbeautify
run: brew install xcbeautify
- name: Select ${{ matrix.xcode }}
run: sudo xcode-select --switch /Applications/${{ matrix.xcode }}.app
- name: Unit tests
run: make tests/unit/pretty

test-Integration-macOS:
runs-on: macos-latest
env:
DD_API_KEY: '${{ secrets.DD_API_KEY }}'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install xcbeautify
run: brew install xcbeautify
- name: tests macOS
run: DD_API_KEY=${{ secrets.DD_API_KEY }} make tests/integration/macOS/pretty
run: make tests/integration/macOS/pretty

test-Integration-iOS:
runs-on: macos-latest
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
env:
DD_API_KEY: '${{ secrets.DD_API_KEY }}'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install xcbeautify
run: brew install xcbeautify
- name: tests iOS
run: DD_API_KEY=${{ secrets.DD_API_KEY }} make tests/integration/iOS/pretty
run: make tests/integration/iOS/pretty

test-Integration-tvOS:
runs-on: macos-latest
env:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
env:
DD_API_KEY: '${{ secrets.DD_API_KEY }}'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install xcbeautify
run: brew install xcbeautify
- name: tests tvOS
run: DD_API_KEY=${{ secrets.DD_API_KEY }} make tests/integration/tvOS/pretty
run: make tests/integration/tvOS/pretty
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,6 @@ tests/integration: tests/integration/macOS tests/integration/iOS tests/integrati

tests/integration/pretty: tests/integration/macOS/pretty tests/integration/iOS/pretty tests/integration/tvOS/pretty

tests/pretty: tests/unit/pretty

tests: tests/unit

0 comments on commit 707a25e

Please sign in to comment.