Skip to content

Commit 2e4becb

Browse files
authored
Merge pull request #22 from tonedefdev/hotfix
Updated GitHub actions
2 parents 7a71ea1 + 6a95da4 commit 2e4becb

File tree

5 files changed

+66
-54
lines changed

5 files changed

+66
-54
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: macOS Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test-mac:
10+
name: Build and Test macOS
11+
runs-on: macos-latest
12+
steps:
13+
- name: Set up Go 1.x
14+
uses: actions/setup-go@v2
15+
with:
16+
go-version: ^1.19
17+
id: go
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
- name: Build
23+
run: |
24+
mkdir /Users/runner/.terraform.d
25+
go build .
26+
env:
27+
HOME: /Users/runner/
28+
- name: Test
29+
run: |
30+
export PATH=$PATH:$PWD
31+
cd cmd
32+
go test -v -cover

.github/workflows/pr-tests.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ jobs:
2323
uses: goreleaser/goreleaser-action@v2
2424
with:
2525
version: latest
26-
args: release --rm-dist
26+
args: release --clean
2727
env:
2828
GITHUB_TOKEN: ${{ secrets.GO_TOKEN }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Windows Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test-win:
10+
name: Build and Test Windows
11+
runs-on: windows-latest
12+
steps:
13+
- name: Set up Go 1.x
14+
uses: actions/setup-go@v2
15+
with:
16+
go-version: ^1.19
17+
id: go
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
- name: Build
23+
run: |
24+
go build .
25+
- name: Test
26+
run: |
27+
New-Item -ItemType Directory -Name terraform.d -Path $env:APPDATA | Out-Null
28+
$env:HOME=$env:APPDATA
29+
$env:TC_CONFIG_PATH=$env:APPDATA
30+
$env:PATH += ";$pwd"
31+
cd cmd
32+
go test -v -cover

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![terracreds-pr-tests](https://github.com/tonedefdev/terracreds/actions/workflows/pr-tests.yml/badge.svg)](https://github.com/tonedefdev/terracreds/actions/workflows/pr-tests.yml)
1+
[![macOS Build](https://github.com/tonedefdev/terracreds/actions/workflows/macos-pr-build-test.yml/badge.svg?branch=hotfix)](https://github.com/tonedefdev/terracreds/actions/workflows/macos-pr-build-test.yml) [![Windows Build](https://github.com/tonedefdev/terracreds/actions/workflows/win-pr-build-test.yml/badge.svg?branch=hotfix)](https://github.com/tonedefdev/terracreds/actions/workflows/win-pr-build-test.yml)
22

33
<img src="./img/terracreds.png" align="right" width="350" height="350">
44

0 commit comments

Comments
 (0)