Skip to content

Commit

Permalink
enabling github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
subygan committed Nov 5, 2023
1 parent 3dfb345 commit 19ab54a
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/01-default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Default Workflow

on:
push:
branches:
- '*'
tags:
- '**'
pull_request:
branches:
- '*'

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
go_version: [1.16, 1.17, 1.18]

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go_version }}
install-go: true

- name: Cache Go Modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: go-${{ matrix.go_version }}-${{ runner.os }}

- name: Check Go version
run: go version

- name: Go mod vendor
run: go mod vendor
- name: Git diff check
run: git diff --exit-code

- name: Build and Test
run: |
make build
make test
make test-integration
- name: Check License and Generate
run: |
make check-license
make generate
git diff --exit-code
- name: Cleanup
run: go clean -modcache

- name: Post Cleanup
run: go clean -cache
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SHELL=/bin/bash

GITHUB_URL=github.com/jsonnet-bundler/jsonnet-bundler
VERSION := $(shell git describe --tags --dirty --always)
GOPATH=$(HOME)/go
OUT_DIR=_output
BIN?=jb
PKGS=$(shell go list ./... | grep -v /vendor/)
Expand Down

0 comments on commit 19ab54a

Please sign in to comment.