mirror of
https://github.com/restic/rest-server.git
synced 2025-12-06 17:15:45 -08:00
Replace Travis with GitHub Actions
This commit is contained in:
25
.github/workflows/linters.yml
vendored
Normal file
25
.github/workflows/linters.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
name: Style Checkers
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
name: Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.15.x
|
||||
id: go
|
||||
|
||||
- name: Install golang-ci
|
||||
run: |
|
||||
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $HOME/bin latest
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Run golang-ci
|
||||
run: |
|
||||
export PATH=$HOME/bin:$PATH
|
||||
golangci-lint run --enable goimports,govet,misspell,stylecheck
|
||||
36
.github/workflows/tests.yml
vendored
Normal file
36
.github/workflows/tests.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: Build and tests
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
strategy:
|
||||
matrix:
|
||||
go-version:
|
||||
- 1.14.x
|
||||
- 1.15.x
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
GOPROXY: https://proxy.golang.org
|
||||
|
||||
steps:
|
||||
|
||||
- name: Set up Go ${{ matrix.go-version }}
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
id: go
|
||||
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
go run build.go --goos linux
|
||||
go run build.go --goos windows
|
||||
go run build.go --goos darwin
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
export PATH=$HOME/bin:$PATH
|
||||
go test ./...
|
||||
Reference in New Issue
Block a user