zephinzer is running pipeline #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: app | |
run-name: ${{ github.actor }} is running pipeline | |
on: [push] | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Restore code dependencies | |
uses: actions/cache/restore@v3 | |
with: | |
key: dependencies | |
path: ./vendor | |
- name: Install system dependencies | |
uses: actions/setup-go@v3 | |
with: | |
go-version: '>=1.20.0' | |
- name: Install global dependencies | |
run: | | |
go env GOBIN BOPATH; | |
make install-swaggo-ci; | |
which swag; | |
- name: Install code dependencies | |
run: make deps | |
- name: Cache code dependencies | |
uses: actions/cache/save@v3 | |
with: | |
key: dependencies | |
path: ./vendor | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Restore code dependencies | |
uses: actions/cache/restore@v3 | |
with: | |
key: dependencies | |
path: ./vendor | |
- name: Run tests | |
run: make test | |
needs: [setup] | |
builds: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Restore code dependencies | |
uses: actions/cache/restore@v3 | |
with: | |
key: dependencies | |
path: ./vendor | |
- name: Generate Swagger documentation | |
run: | | |
go env GOBIN; | |
go env GOPATH; | |
go env GOROOT; | |
export PATH=${PATH}:$(go env GOPATH)/bin; | |
make docs-swaggo; | |
- name: Verify binary build | |
run: make binary | |
- name: Verify image build | |
run: make image | |
needs: [setup] |