Skip to content

Rename import and go package back so pulling the upstream isn't as #67

Rename import and go package back so pulling the upstream isn't as

Rename import and go package back so pulling the upstream isn't as #67

Workflow file for this run

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
name: CI
jobs:
test:
runs-on: ubuntu-latest
container: alpine:edge # latest go pls
steps:
- name: checkout
uses: actions/checkout@v3
- name: add dependencies
run: apk add go git
- name: install ctags
run: ./install-ctags-alpine.sh
- name: test
run: go test ./...
fuzz-test:
name: fuzz test
runs-on: ubuntu-latest
container: alpine:edge
steps:
- name: add dependencies
run: apk add bash go
# Pinned a commit to make go version configurable.
# This should be safe to upgrade once this commit is in a released version:
# https://github.com/jidicula/go-fuzz-action/commit/23cc553941669144159507e2cccdbb4afc5b3076
- uses: jidicula/go-fuzz-action@0206b61afc603b665297621fa5e691b1447a5e57
with:
packages: 'github.com/xvandish/zoekt' # This is the package where the Protobuf round trip tests are defined
fuzz-time: 30s
fuzz-minimize-time: 1m
go-version: '1.22'
shellcheck:
name: shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run ShellCheck
uses: ludeeus/[email protected]
shfmt:
name: shfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: reviewdog/[email protected]
with:
filter_mode: "nofilter"
fail_on_error: "true"
shfmt_flags: "-i 2 -ci -bn"
# lint-protos:
# name: "buf lint"
# runs-on: ubuntu-latest
# steps:
# # Run `git checkout`
# - uses: actions/checkout@v2
# # Install the `buf` CLI
# - uses: bufbuild/buf-setup-action@v1
# with:
# github_token: ${{ secrets.GH_TOKEN }}
# # Lint your Protobuf sources
# - run: .github/workflows/buf-lint-check.sh
# format-protos:
# name: "buf format"
# runs-on: ubuntu-latest
# steps:
# # Run `git checkout`
# - uses: actions/checkout@v2
# # Install the `buf` CLI
# - uses: bufbuild/buf-setup-action@v1
# with:
# github_token: ${{ secrets.GH_TOKEN }}
# # Check to see if the Protobuf sources are formatted
# - run: .github/workflows/buf-format-check.sh
# generate-protos:
# name: "buf generate"
# runs-on: ubuntu-latest
# steps:
# # Run `git checkout`
# - uses: actions/checkout@v2
# # Install the `buf` CLI
# - uses: bufbuild/buf-setup-action@v1
# with:
# github_token: ${{ secrets.GH_TOKEN }}
# # Check if the generated code is up-to-date
# - run: .github/workflows/buf-generate-check.sh
# We build a shared docker image called "zoekt". This is not pushed, but is
# used for creating the indexserver and webserver images.
docker:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- "test"
- "shellcheck"
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: checkout
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: version
id: version
run: .github/workflows/docker-version.sh
- name: build-zoekt
uses: docker/build-push-action@v4
with:
context: .
tags: "zoekt:latest"
push: "false"
build-args: VERSION=${{ steps.version.outputs.value }}
- name: build-push-webserver
uses: docker/build-push-action@v4
with:
outputs: "type=registry,push=true"
tags: ghcr.io/${{ github.repository_owner }}/zoekt-webserver:${{ steps.version.outputs.value }},ghcr.io/${{ github.repository_owner }}/zoekt-webserver:latest
file: Dockerfile.webserver
- name: build-push-indexserver
uses: docker/build-push-action@v4
with:
outputs: "type=registry,push=true"
tags: ghcr.io/${{ github.repository_owner }}/zoekt-indexserver:${{ steps.version.outputs.value }},ghcr.io/${{ github.repository_owner }}/zoekt-indexserver:latest
file: Dockerfile.indexserver