34 lines
666 B
YAML
34 lines
666 B
YAML
name: Build and Test Golang
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
image: golang:1.22 # Aktuelle Version verwenden
|
|
options: --network host
|
|
|
|
steps:
|
|
# Schritt 1: Repository klonen
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
# Schritt 2: Abhängigkeiten installieren
|
|
- name: Install Dependencies
|
|
run: go mod tidy
|
|
|
|
# Schritt 3: Code bauen
|
|
- name: Build Application
|
|
run: go build .
|
|
|
|
- name: Upload Build Artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: serialToWebsocket
|
|
path: .
|