Skip to content

Commit

Permalink
add github actions test case (#15)
Browse files Browse the repository at this point in the history
* add github actions test case

Co-authored-by: Nick Maliwacki <[email protected]>
  • Loading branch information
KnicKnic and Nick Maliwacki authored Dec 29, 2021
1 parent dd59d79 commit 67e8432
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: build_test

on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/[email protected]


- uses: actions/setup-go@v2
with:
stable: 'false'
go-version: '1.18.0-beta1' # The Go version to download (if necessary) and use.

- name: Enable running examples & tests
run: |
copy bin\psh_host.dll . ;
copy bin\psh_host.dll .\pkg\powershell\ ;
copy bin\psh_host.dll .\tests\benchmarks\ ;
- run: go build .\...
- name: run unit tests
run: |
go install gotest.tools/gotestsum@latest
# go get -mod=readonly gotest.tools/gotestsum@latest
gotestsum --junitfile junit.xml
# publish unit tests
# - name: I should do something here....

- name: Build examples
run: go build -a -o examples_cmd.exe github.com/KnicKnic/go-powershell/examples/cmd

- name: Run examples
run: .\examples_cmd.exe -command .\\tests\t1.ps1 -command .\\tests\\t2.ps1

0 comments on commit 67e8432

Please sign in to comment.