Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/v2-exp' into dlvhdr/tree-example
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolev Hadar committed Dec 5, 2024
2 parents f3fa945 + a8ed961 commit 9568bd7
Show file tree
Hide file tree
Showing 124 changed files with 4,748 additions and 4,405 deletions.
59 changes: 14 additions & 45 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,17 @@ on: [push, pull_request]

jobs:
build:
strategy:
matrix:
go-version: [~1.18, ^1]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
GO111MODULE: "on"
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@v4

- name: Download Go modules
run: go mod download

- name: Build
run: |
go mod tidy
go build -v ./...
- name: Test
run: go test ./...

- name: Build examples
if: ${{ matrix.go-version != '~1.18' }}
run: |
go mod tidy
go build -v ./...
working-directory: ./examples

- name: Test examples
if: ${{ matrix.go-version != '~1.18' }}
run: go test -v ./...
working-directory: ./examples

- name: Build tutorials
if: ${{ matrix.go-version != '~1.18' }}
run: |
go mod tidy
go build -v ./...
working-directory: ./tutorials
uses: charmbracelet/meta/.github/workflows/build.yml@main

build-go-mod:
uses: charmbracelet/meta/.github/workflows/build.yml@main
with:
go-version: ""
go-version-file: ./go.mod

build-examples:
uses: charmbracelet/meta/.github/workflows/build.yml@main
with:
go-version: ""
go-version-file: ./examples/go.mod
working-directory: ./examples
28 changes: 0 additions & 28 deletions .github/workflows/lint-soft.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/lint-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: lint-sync
on:
schedule:
# every Sunday at midnight
- cron: "0 0 * * 0"
workflow_dispatch: # allows manual triggering

permissions:
contents: write
pull-requests: write

jobs:
lint:
uses: charmbracelet/meta/.github/workflows/lint-sync.yml@main
24 changes: 2 additions & 22 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,6 @@ on:
push:
pull_request:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ^1

- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Optional: golangci-lint command line arguments.
#args:
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
lint:
uses: charmbracelet/meta/.github/workflows/lint.yml@main
10 changes: 2 additions & 8 deletions .golangci-soft.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
run:
tests: false
issues-exit-code: 0

issues:
include:
Expand All @@ -14,16 +15,13 @@ issues:

linters:
enable:
# - dupl
- exhaustive
# - exhaustivestruct
- goconst
- godot
- godox
- gomnd
- mnd
- gomoddirectives
- goprintffuncname
# - lll
- misspell
- nakedret
- nestif
Expand All @@ -34,13 +32,9 @@ linters:

# disable default linters, they are already enabled in .golangci.yml
disable:
- deadcode
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
2 changes: 0 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ issues:
linters:
enable:
- bodyclose
- exportloopref
- gofumpt
- goimports
- gosec
- nilerr
- predeclared
- revive
- rowserrcheck
- sqlclosecheck
Expand Down
13 changes: 0 additions & 13 deletions CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit 9568bd7

Please sign in to comment.