Add Go testing actions
Gitea Actions Demo / audit (push) Successful in 3m1s Details

This commit is contained in:
raul 2024-03-30 16:38:15 +01:00
parent 1074c3d941
commit 331b740342
2 changed files with 37 additions and 12 deletions

View File

@ -3,18 +3,40 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: on:
push: push:
branches: [main] branches: [main]
pull_request:
branches: [main]
jobs: jobs:
Explore-Gitea-Actions: audit:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!" - uses: actions/checkout@v2
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code - name: Set up Go
uses: actions/checkout@v3 uses: actions/setup-go@v2
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." with:
- run: echo "🖥️ The workflow is now ready to test your code on the runner." go-version: '>=1.22.0'
- name: List files in the repository
run: | - name: Verify dependencies
ls ${{ gitea.workspace }} run: go mod verify
- run: echo "🍏 This job's status is ${{ job.status }}."
- name: Build
run: go build -v ./...
- name: Run go vet
run: go vet ./...
# - run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
# - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
# - run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
# - name: Check out repository code
# uses: actions/checkout@v3
# - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
# - run: echo "🖥️ The workflow is now ready to test your code on the runner."
# - name: List files in the repository
# run: |
# ls ${{ gitea.workspace }}
# - run: echo "🍏 This job's status is ${{ job.status }}."

View File

@ -6,6 +6,9 @@ Copyright © 2024 NAME HERE <EMAIL ADDRESS>
// This is a new change for triggering CI/CD! // This is a new change for triggering CI/CD!
// Last testing change I promise // Last testing change I promise
// Jokes on you, I LIED
package main package main
import "actions-test/cmd" import "actions-test/cmd"