Add build workflow

This commit is contained in:
Masaaki Goshima 2021-03-11 23:43:21 +09:00
parent 4167aefe08
commit 7290b0d6c3
2 changed files with 21 additions and 0 deletions

View File

@ -1,6 +1,14 @@
name: Go
on: [push, pull_request]
jobs:
build:
name: Build on limited environment
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: build
run: docker-compose run go-json
test:
name: Test
strategy:

13
docker-compose.yml Normal file
View File

@ -0,0 +1,13 @@
version: '2'
services:
go-json:
image: golang:1.16
volumes:
- '.:/go/src/go-json'
deploy:
resources:
limits:
memory: 2048M
working_dir: /go/src/go-json
command: |
sh -c "go test -c . && ls go-json.test"