Skip to content

Commit

Permalink
feat: add github ci workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-gang committed May 23, 2024
1 parent e72a3f6 commit 3656f52
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
29 changes: 29 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish

on:
push:
tags:
- "v*"

permissions:
contents: write

jobs:
publish_tester:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Unshallow
run: git fetch --prune --unshallow
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.21.x
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: v1.21.2
args: release -f main.goreleaser.yml --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test

on: push

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.21.x

- run: make test

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.21.x

- uses: dominikh/[email protected]
with:
version: "2023.1"
install-go: false
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ build:
test:
go test -count=1 -p 1 -v ./internal/...

# ToDo: Update stage slugs
test_bash: build
CODECRAFTERS_SUBMISSION_DIR=./internal/test_helpers/bash \
CODECRAFTERS_TEST_CASES_JSON="[ \
Expand Down
13 changes: 13 additions & 0 deletions main.goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
builds:
- main: ./cmd/tester/main.go
binary: tester
env:
- CGO_ENABLED=0
goarch: [amd64, arm64]
goos: [linux, darwin]

archives:
- name_template: "{{ .Tag }}_{{ .Os }}_{{ .Arch }}"
format: tar.gz
files:
- test.sh
10 changes: 0 additions & 10 deletions sample-logs.txt

This file was deleted.

0 comments on commit 3656f52

Please sign in to comment.