* add ci

* format code

* update go version

* update go file

* add kindlegen

* update go file

* update go file

* test ci

* multiline run

* edit go file

* fix tar

* mv kindlegen to usr local bin
This commit is contained in:
lapwat
2022-03-13 12:36:58 +01:00
committed by GitHub
parent 53d0dd1360
commit 4d6171544d
3 changed files with 51 additions and 11 deletions

15
.github/workflows/format.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: Format
on:
push:
paths:
- '**.go'
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check formatting
run: if [[ -n "$(gofmt -l .)" ]]; then exit 1; fi

25
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Test
on:
push:
paths:
- '**.go'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Install kindlegen
run: |
curl -L https://github.com/lapwat/papeer/releases/download/kindlegen/kindlegen_linux_2.6_i386_v2_9.tar.gz > kindlegen.tar.gz
tar xzvf kindlegen.tar.gz
chmod +x kindlegen
mv kindlegen /usr/local/bin
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: make test