Skip to content

feat(examples): add todolist package & realm (#1811) #1

feat(examples): add todolist package & realm (#1811)

feat(examples): add todolist package & realm (#1811) #1

Workflow file for this run

name: lint
on:
push:
branches: [ "master" ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Lint
uses: golangci/golangci-lint-action@v4
env:
# Don't attempt to compile/resolve C packages (grocksdb, cleveldb).
CGO_ENABLED: 0
with:
# sync with misc/devdeps/go.mod
version: v1.54
args:
--config=./.github/golangci.yml
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Install make
run: sudo apt-get install -y make
# prefill dependencies so that mod messages don't show up in make output
- name: Fetch dependencies
run: go mod download -modfile ./misc/devdeps/go.mod -x
# inspired by:
# https://github.com/Jerome1337/gofmt-action/blob/d5eabd189843f1d568286a54578159978b7c0fb1/entrypoint.sh
- name: Check gofumpt / goimports
run: |
output="$(GOFMT_FLAGS=-l GOIMPORTS_FLAGS=-l make -s fmt)"
if [ ! -z "$output" ]; then
echo "The following files are not properly formatted; run 'make fmt imports' to format them."
echo "$output"
exit 1
else
echo 'Succeeded.'
fi
mod_tidy_check:
runs-on: ubuntu-latest
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
- name: Install make
run: sudo apt-get install -y make
- name: Check go.mods
env:
VERIFY_MOD_SUMS: true
run: |
# Ensure Make is installed
make --version
# Run the tidy target
make tidy