forked from mirror/go-json
Add build workflow
This commit is contained in:
parent
4167aefe08
commit
7290b0d6c3
|
@ -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:
|
||||
|
|
|
@ -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"
|
Loading…
Reference in New Issue