refactor: Extract store package (#100) #234
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: Go | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- name: Build | |
run: go build -v ./... | |
lint: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read # Read repo content | |
pull-requests: read # Read PR base commit | |
checks: write # Annotate code | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.60 | |
# Only report new issues introduced by *this* PR. Requires | |
# `permissons.pull-requests: read`. | |
only-new-issues: true | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.22' | |
- uses: google-github-actions/setup-gcloud@v2 | |
with: | |
version: '>= 486.0.0' | |
install_components: 'cloud-firestore-emulator' | |
- name: Start Firestore emulator | |
run: | | |
gcloud emulators firestore start --host-port=[::1]:8410 & | |
until curl '[::1]:8410' 2>/dev/null; do | |
sleep 1 | |
done | |
- name: Test | |
run: go test -v ./... | |
env: | |
FIRESTORE_EMULATOR_HOST: '[::1]:8410' | |