Version 12.83.1 #1019
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 | |
jobs: | |
Linux: | |
name: Linux | |
runs-on: ubuntu-latest | |
env: | |
SRC_DIR: src/github.com/${{ github.repository }} | |
EK_TEST_PORT: 8080 | |
strategy: | |
matrix: | |
go: [ '1.20.x', '1.21.x' ] | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
cache: false | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ${{env.SRC_DIR}} | |
- uses: actions/cache@v3 | |
id: cache-deps | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-essentialkaos-ek-${{ 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 12 | |
- name: Send coverage data | |
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 }} | |
macOS: | |
name: macOS | |
runs-on: macos-latest | |
needs: Linux | |
env: | |
SRC_DIR: src/github.com/${{ github.repository }} | |
EK_TEST_PORT: 8080 | |
strategy: | |
matrix: | |
go: [ '1.20.x', '1.21.x' ] | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
cache: false | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: ${{env.SRC_DIR}} | |
- uses: actions/cache@v3 | |
id: cache-deps | |
with: | |
path: | | |
~/Library/Caches/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-essentialkaos-ek-${{ 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 12 | |
- name: Send coverage data | |
uses: essentialkaos/goveralls-action@v1 | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
path: ${{env.SRC_DIR}} | |
profile: coverage.txt | |
parallel: true | |
flag-name: macos-${{ matrix.go }} | |
Windows: | |
name: Windows (Stubs) | |
runs-on: windows-latest | |
env: | |
SRC_DIR: src/github.com/${{ github.repository }} | |
EK_TEST_PORT: 8080 | |
strategy: | |
matrix: | |
go: [ '1.20.x', '1.21.x' ] | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
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.sh 12 | |
SendCoverage: | |
name: Send Coverage | |
runs-on: ubuntu-latest | |
needs: [Linux, macOS] | |
steps: | |
- name: Finish parallel tests | |
uses: essentialkaos/goveralls-action@v2 | |
env: | |
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
parallel-finished: true | |
Typos: | |
name: Typos | |
runs-on: ubuntu-latest | |
needs: SendCoverage | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Check spelling | |
continue-on-error: true | |
uses: crate-ci/typos@master |