Skip to content

ci: Add .github workflows #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Tooling Team
* @Vonage/server-sdk
* @SMadani
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Request/Response**
If applicable, please provide the request used and the response

**Java Version**
- Version:

**Kotlin Version**
- Version:

**Kotlin SDK Version**
- Version:

**Additional context/ Error Log**
Add any other context about the problem here.
6 changes: 6 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
_Describe your changes here_

## Contribution Checklist
* [ ] Unit tests!
* [ ] Updated [CHANGELOG.md](CHANGELOG.md)
* [ ] My name is in [CONTRIBUTORS.md](CONTRIBUTORS.md)
33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build
on:
push:
branches:
- main
pull_request:

permissions: read-all

jobs:
build:
permissions:
contents: read
checks: write
statuses: write
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
java: [11, 17, 21]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout the repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Setup Java
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@94baf225fe0a508e581a564467443d0e2379123b
- name: Build with Gradle
run: ./gradlew build
39 changes: 39 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '35 2 * * 2'

permissions: read-all

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: 'ubuntu-latest'
permissions:
security-events: write
packages: read
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: java-kotlin
build-mode: autobuild
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- name: Initialize CodeQL
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Vonage Quickstart Examples for Kotlin

![SLOC](https://sloc.xyz/github/Vonage/vonage-kotlin-code-snippets)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Community Slack](https://img.shields.io/badge/Slack-4A154B?style=flat&logo=slack&logoColor=white)](https://developer.vonage.com/community/slack)
Expand Down Expand Up @@ -33,7 +34,6 @@ Most APIs will require you to [create an application](https://dashboard.nexmo.co
2. To work with a different / specific version of the SDK or any dependencies, edit the `build.gradle.kts` file.
4. Copy `.env-example` to `.env` and edit the values. The [EnvironmentVariables.kt](src/main/kotlin/com/vonage/quickstart/kt/EnvironmentVariables.kt) file is where they're loaded.
5. Use your IDE to run the examples you are interested in.
You will need to point the run configuration to use the `.env` file as an environment variable.

## Searchable Examples
See [SNIPPETS.md](SNIPPETS.md) for an aggregated list of all the code in this repository. You can then
Expand Down
4 changes: 4 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

// This is a workaround for the required property in com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
project.setProperty("mainClassName", "AggregateSnippetsKt")

plugins {
kotlin("jvm") version "2.1.+"
id("io.ktor.plugin") version "3.0.+"
Expand Down