Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions .github/workflows/code-health-foascli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: 'Code Health FoasCLI'
on:
push:
branches:
- main
paths:
- 'tools/cli/**'
pull_request:
branches:
- main
paths:
- 'tools/cli/**'
workflow_dispatch: {}
workflow_call: {}

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout CLI
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: 'tools/cli/go.mod'
- name: Build CLI
working-directory: tools/cli
run: make build
unit-tests:
needs: build
env:
COVERAGE: coverage.out
UNIT_TAGS: unit
INTEGRATION_TAGS: integration
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: 'tools/cli/go.mod'
- name: Run unit tests
working-directory: tools/cli
run: make unit-test
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
sparse-checkout: |
.github
tools
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: 'tools/cli/go.mod'
cache: false # see https://github.com/golangci/golangci-lint-action/issues/807
- name: golangci-lint
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837
with:
version: v1.64.5
working-directory: tools/cli
- name: Checkout GitHub actions
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
sparse-checkout: |
.github
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash
- name: Check workflow files
run: |
echo "::add-matcher::.github/actionlint-matcher.json"
${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
e2e-tests:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: 'tools/cli/go.mod'
- name: Run e2e tests
working-directory: tools/cli
run: make e2e-test
71 changes: 8 additions & 63 deletions .github/workflows/code-health-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,21 @@ on:
branches:
- main
paths:
- 'tools/**'
pull_request: {}
- 'tools/postman/**'
- 'tools/spectral/**'
pull_request:
branches:
- main
paths:
- 'tools/postman/**'
- 'tools/spectral/**'
workflow_dispatch: {}
workflow_call: {}

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout CLI
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: 'tools/cli/go.mod'
- name: Build CLI
working-directory: tools/cli
run: make build
unit-tests:
needs: build
env:
COVERAGE: coverage.out
UNIT_TAGS: unit
INTEGRATION_TAGS: integration
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: 'tools/cli/go.mod'
- name: Run unit tests
working-directory: tools/cli
run: make unit-test
js-tests:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -95,21 +68,6 @@ jobs:
exit 1
fi
exit 0
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: 'tools/cli/go.mod'
cache: false # see https://github.com/golangci/golangci-lint-action/issues/807
- name: golangci-lint
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837
with:
version: v1.64.5
working-directory: tools/cli
- name: Checkout GitHub actions
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
with:
sparse-checkout: |
.github
- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
Expand All @@ -119,16 +77,3 @@ jobs:
echo "::add-matcher::.github/actionlint-matcher.json"
${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
e2e-tests:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- name: Install Go
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34
with:
go-version-file: 'tools/cli/go.mod'
- name: Run e2e tests
working-directory: tools/cli
run: make e2e-test