Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
triole committed Jun 23, 2024
1 parent 93486c5 commit fe32f81
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
build:
test:
uses: ./.github/workflows/test.yaml
permissions: write-all
release:
needs:
- test
name: make release
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Make github config
Expand All @@ -33,7 +39,7 @@ jobs:
env:
GOROOT: /home/runner/.local/go
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# APP_NAME: binary_name
# APP_NAME: none
SOURCE_FOLDER: src
# TARGET_FOLDER: build
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_build.sh
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: test

on:
push:
branches: ["master"]
workflow_dispatch:
workflow_call:

jobs:
test:
name: go test
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Go
env:
TARGET_FOLDER: /home/runner/.local/go
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_install.sh
| bash
- name: Add packages in sub folders to GOROOT
env:
GOROOT: /home/runner/.local/go
SOURCE_FOLDER: src
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_add_sub_packages.sh
| bash
- name: run tests
env:
GOROOT: /home/runner/.local/go
SOURCE_FOLDER: src
run: curl -sL https://raw.githubusercontent.com/triole/ghwfe/master/sh/go_test.sh
| bash

0 comments on commit fe32f81

Please sign in to comment.