Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
paths-ignore:
- Examples
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Build and Test SDK

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
branches: "**"
branches: ["**"]

env:
DIFF_COVERAGE_THRESHOLD: '80'
DIFF_COVERAGE_THRESHOLD: "80"

permissions:
contents: read
Expand All @@ -14,7 +18,7 @@ permissions:

jobs:
build:
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
steps:
- name: "[Checkout] Repo"
uses: actions/checkout@v4
Expand Down Expand Up @@ -63,14 +67,14 @@ jobs:
fi
COVERAGE_EXIT_CODE=$?
set -e # Re-enable exit on error

# Check if markdown report was generated
if [ -f "diff_coverage.md" ]; then
echo "✅ Coverage report generated"
else
echo "⚠️ Coverage report not generated"
fi

# Only fail the build if coverage is below threshold AND not bypassed
if [ "${{ steps.coverage_bypass.outputs.bypass }}" != "true" ] && [ $COVERAGE_EXIT_CODE -ne 0 ]; then
echo "❌ Coverage check failed - build will fail"
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: "CodeQL"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
branches: ["main"]
paths-ignore:
- "Examples/**"
schedule:
- cron: "27 1 * * 0"

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: java-kotlin
build-mode: none
dependency-caching: true

steps:
- name: Checkout repository
uses: actions/checkout@v6

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
dependency-caching: ${{ matrix.dependency-caching }}
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/codeql/codeql-config.yml

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
14 changes: 14 additions & 0 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Checks if the PR title follows semantic commit message conventions
name: Lint PR
permissions:
contents: read
pull-requests: write

on:
pull_request:
types: [opened, edited, synchronize]

jobs:
call:
uses: OneSignal/sdk-actions/.github/workflows/lint-pr-title.yml@main
secrets: inherit
Loading