Skip to content
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

pre-merge-request-tests #203

Closed
wants to merge 4 commits into from
Closed
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
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# This workflow will: build gomud for multiple os/architectures
# archive the binaries and create a new release for users to easily download

name: Go
name: Build and release

on:
push:
branches: ["master", "ci-cd-releases"]
branches: [master]
workflow_dispatch:

permissions:
contents: write
Expand All @@ -14,14 +15,22 @@ env:
RELEASE_FILENAME: go-mud-release

jobs:
# test:
# runs-on: ubuntu-latest
# steps:
# - name: Test
# run: go test -v ./...
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23"

- name: Run tests
run: go test ./...

build:
runs-on: ubuntu-latest
needs: "test"
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -59,7 +68,7 @@ jobs:

release:
runs-on: ubuntu-latest
needs: build
needs: "build"
steps:
- uses: actions/checkout@v4

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: run-tests

on:
pull_request:
branches: [master]
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23"

- name: Run tests
run: go test ./...
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.vscode
private-notes.txt
**/users/*
**/config-overrides.yaml
bin/
**/config-overrides.yaml
15 changes: 15 additions & 0 deletions internal/just_a_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package internal

import (
"testing"
)

func TestShouldPass(t *testing.T) {
if 1 != 1 {
t.Fatalf("Something is wrong in the universe...")
}
}

func TestShouldFail(t *testing.T) {
//t.Fatalf("TestShouldFail failed.")
}
Loading