From 25bc70edc2e4229da66d937b10781d1f252283cd Mon Sep 17 00:00:00 2001 From: tkmru Date: Wed, 21 Apr 2021 11:31:11 +0900 Subject: [PATCH] run test on CI --- .github/workflows/test.yml | 34 ++++++++++++++++++++++++++++++++++ .gitignore | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..71d05ae --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +name: test +on: [push] +jobs: + + build: + name: Test and Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.16 + uses: actions/setup-go@v2 + with: + go-version: 1.16.3 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: cache + uses: actions/cache@v2 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go- + - name: Get dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: go mod download + + - name: Test + run: go test ./pkg/* + + - name: Build + run: go build \ No newline at end of file diff --git a/.gitignore b/.gitignore index 43163e4..ec919e2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ # Dependency directories (remove the comment below to include it) # vendor/ -medit +ipa-medit # goreleaser dist/