Basic golang CI setup (#360)

* bskyweb: Makefile and dev env

This matches the setup for local dev testing in atproto and indigo
repos.

* gitignore: don't ignore self and .github/

* CI: golang build+test and lint actions

* bskyweb: better use of godotenv

A recent change from indigo.

* prettier: ignore top-level app.json

* CI: bump from golang 1.19 to 1.20

* bskyweb: update to golang 1.20
This commit is contained in:
bnewbold 2023-03-27 08:16:17 -07:00 committed by GitHub
parent 4fbe0e267c
commit 2789d5c056
9 changed files with 102 additions and 12 deletions

43
.github/workflows/golang-test-lint.yml vendored Normal file
View file

@ -0,0 +1,43 @@
name: golang
on:
pull_request:
push:
branches:
- main
concurrency:
group: '${{ github.workflow }}-${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Set up Go tooling
uses: actions/setup-go@v3
with:
go-version: 1.20
- name: Dummy JS File
run: touch bskyweb/static/js/blah.js
- name: Check
run: cd bskyweb/ && make check
- name: Build (binary)
run: cd bskyweb/ && make build
- name: Test
run: cd bskyweb/ && make test
lint:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Set up Go tooling
uses: actions/setup-go@v3
with:
go-version: 1.20
- name: Dummy JS File
run: touch bskyweb/static/js/blah.js
- name: Lint
run: cd bskyweb/ && make lint