Skip to content

docs(opencode): document OpenCode adapter in architecture and workflow reference #950

docs(opencode): document OpenCode adapter in architecture and workflow reference

docs(opencode): document OpenCode adapter in architecture and workflow reference #950

Workflow file for this run

name: CI
on:
push:
branches:
# This is to make sure that there is no broken CI on
# the main branch, and also for Sonarqube integration
- main
# We need it for better Sonarqube integration
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
concurrency:
# Cancel any currently running job or workflow in the same concurrency group.
# The group is a unique identifier for the workflow run.
#
# Explanation:
# - github.workflow: The name of the workflow (e.g. Workflow 1).
# - github.event.pull_request.number: The number of the pull request (when the trigger event is a PR).
# - github.ref_name: The short branch or tag name (when the trigger is not a PR but a push).
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: latest
verify: false
test:
name: Test
runs-on: ubuntu-latest
env:
# secrets cannot be directly referenced in if: conditionals
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Run tests
run: go test -race -count=1 -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
if: success() && env.CODECOV_TOKEN != ''
with:
fail_ci_if_error: false
name: codecov-umbrella
flags: unittests
files: ./coverage.out
token: ${{ secrets.CODECOV_TOKEN }}
test-windows:
name: Test (Windows)
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Run tests
run: go test -count=1 ./...
build:
name: Build
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Build binary
run: make build