[color] Improve named colors support #1854
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master, develop] | |
pull_request: | |
branches: [master] | |
schedule: | |
- cron: '0 14 */15 * *' | |
permissions: | |
actions: read | |
contents: read | |
statuses: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
SRC_DIR: src/github.com/${{ github.repository }} | |
EK_TEST_PORT: 8080 | |
jobs: | |
Linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.22.x', '1.23.x' ] | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
cache: false | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ${{env.SRC_DIR}} | |
- name: Use cache for dependencies data | |
uses: actions/cache@v4 | |
id: cache-deps | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-${{github.repository_owner}}-${{github.event.repository.name}}-${{ matrix.go }}-${{ hashFiles('**/go.sum') }} | |
- name: Download dependencies | |
working-directory: ${{env.SRC_DIR}} | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: make deps | |
- name: Run tests | |
working-directory: ${{env.SRC_DIR}} | |
run: .scripts/nix.sh | |
- name: Send coverage data to Coveralls | |
uses: essentialkaos/goveralls-action@v2 | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
path: ${{env.SRC_DIR}} | |
profile: coverage.txt | |
parallel: true | |
flag-name: linux-${{ matrix.go }} | |
- name: Send coverage data to Codacy | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
run: | | |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \ | |
--force-coverage-parser go \ | |
-r ${{env.SRC_DIR}}/coverage.txt \ | |
--partial | |
macOS: | |
name: macOS | |
runs-on: macos-latest | |
needs: Linux | |
strategy: | |
matrix: | |
go: [ '1.22.x', '1.23.x' ] | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
cache: false | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ${{env.SRC_DIR}} | |
- name: Use cache for dependencies data | |
uses: actions/cache@v4 | |
id: cache-deps | |
with: | |
path: | | |
~/Library/Caches/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-${{github.repository_owner}}-${{github.event.repository.name}}-${{ matrix.go }}-${{ hashFiles('**/go.sum') }} | |
- name: Download dependencies | |
working-directory: ${{env.SRC_DIR}} | |
if: steps.cache-deps.outputs.cache-hit != 'true' | |
run: make deps | |
- name: Run tests | |
working-directory: ${{env.SRC_DIR}} | |
run: .scripts/nix.sh | |
- name: Send coverage data to Coveralls | |
uses: essentialkaos/goveralls-action@v2 | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
path: ${{env.SRC_DIR}} | |
profile: coverage.txt | |
parallel: true | |
flag-name: macos-${{ matrix.go }} | |
- name: Send coverage data to Codacy | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
run: | | |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \ | |
--force-coverage-parser go \ | |
-r ${{env.SRC_DIR}}/coverage.txt \ | |
--partial | |
Windows: | |
name: Windows (Stubs) | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
go: [ '1.22.x', '1.23.x' ] | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
cache: false | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ${{env.SRC_DIR}} | |
- name: Run tests on Windows | |
working-directory: ${{env.SRC_DIR}} | |
run: .scripts/windows.ps1 | |
SendCoverage: | |
name: Send Coverage | |
runs-on: ubuntu-latest | |
if: success() || failure() | |
needs: [Linux, macOS] | |
steps: | |
- name: Finish parallel tests (Coveralls) | |
uses: essentialkaos/goveralls-action@v2 | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
parallel-finished: true | |
- name: Finish parallel tests (Codacy) | |
env: | |
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) final | |
Typos: | |
name: Typos | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check spelling | |
continue-on-error: true | |
uses: crate-ci/typos@master |