Skip to content

Ork2ecs rocket

Ork2ecs rocket #131

Workflow file for this run

name: Build and Test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Check out the repository
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.23
- name: Install dependencies
run: go mod download
- name: Build the project
run: go build -v ./...
- name: Run tests without coverage
if: matrix.os != 'ubuntu-latest'
run: go test ./...
- name: Run tests with coverage
if: matrix.os == 'ubuntu-latest'
run: go test -cover -coverprofile=coverage.out ./...
- name: SonarQube Scan
if: matrix.os == 'ubuntu-latest'
uses: SonarSource/sonarqube-scan-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}