Skip to content

Merge pull request #300 from strideynet/kev-remove-furcon-from-fc-feed #310

Merge pull request #300 from strideynet/kev-remove-furcon-from-fc-feed

Merge pull request #300 from strideynet/kev-remove-furcon-from-fc-feed #310

Workflow file for this run

name: On Commit
on:
push:
branches: [main]
pull_request:
jobs:
test-go:
name: "Test Go"
services:
dind:
image: docker:24.0.7-dind-rootless
ports:
- 2375:2375
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.23"
- name: Test
run: go test -race -coverprofile=coverage.txt -covermode=atomic -v ./...
- name: Upload coverage
uses: codecov/codecov-action@v3
lint-go:
name: Lint Go
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.23"
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
args: --timeout=5m
check-sqlc:
name: Check sqlc generation
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "1.23"
cache: false
- name: Install sqlc
run: go install github.com/sqlc-dev/sqlc/cmd/[email protected]
- run: sqlc generate
- name: Check that sqlc queries are up-to-date
run: git diff --exit-code
lint-sql:
runs-on: ubuntu-latest
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "3.8"
- name: Install sqlfluff
run: "pip install sqlfluff==2.3.2"
- name: Lint sql files
run: "sqlfluff lint"
build-and-push-docker:
name: Build and push Docker image
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate docker tags
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
ghcr.io/${{ github.repository }}/bffsrv
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
context: .
file: bffsrv.Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}