forked from MTSR/mapserver
workflows
This commit is contained in:
parent
e7528d9ace
commit
3835d3f575
57
.github/workflows/build.yml
vendored
Normal file
57
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,57 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v2.1.5
|
||||
with:
|
||||
go-version: 1.16
|
||||
|
||||
- name: Set up nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '17'
|
||||
run: cd public && npm ci && npm run bundle
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Tests
|
||||
run: |
|
||||
go mod tidy
|
||||
go test -v ./...
|
||||
|
||||
- name: Docker Login
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
if: success() && startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
15
.github/workflows/jshint.yml
vendored
15
.github/workflows/jshint.yml
vendored
@ -10,11 +10,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: apt
|
||||
run: sudo apt-get install -y nodejs npm
|
||||
|
||||
- name: jshint install
|
||||
run: sudo npm i -g jshint
|
||||
|
||||
- name: jshint run
|
||||
run: cd public/js && jshint
|
||||
- name: Set up nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '17'
|
||||
|
||||
- name: Run jshint
|
||||
run: cd public && npm ci && npm run jshint
|
||||
|
@ -3,6 +3,7 @@ Minetest mapserver
|
||||
|
||||
![](https://github.com/minetest-mapserver/mapserver/workflows/jshint/badge.svg)
|
||||
![](https://github.com/minetest-mapserver/mapserver/workflows/go-test/badge.svg)
|
||||
![](https://github.com/minetest-mapserver/mapserver/workflows/build/badge.svg)
|
||||
|
||||
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/minetest-mapserver/mapserver)
|
||||
![GitHub repo size](https://img.shields.io/github/repo-size/minetest-mapserver/mapserver.svg)
|
||||
|
Loading…
Reference in New Issue
Block a user