Skip to content

Merge pull request #24 from thaJeztah/integrate_tracing #103

Merge pull request #24 from thaJeztah/integrate_tracing

Merge pull request #24 from thaJeztah/integrate_tracing #103

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
GOTOOLCHAIN: local
permissions:
contents: read
jobs:
#
# golangci-lint
#
linters:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: Linters
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: stable
cache: false # see actions/setup-go#368
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.13
skip-cache: true
- name: Lint otel
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.13
skip-cache: true
working-directory: otel
#
# Project checks
#
project:
name: Project Checks
if: github.repository == 'containerd/log'
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: stable
cache: false # see actions/setup-go#368
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: src/github.com/containerd/log
fetch-depth: 25
- uses: containerd/project-checks@d7751f3c375b8fe4a84c02a068184ee4c1f59bc4 # v1.2.2
with:
working-directory: src/github.com/containerd/log
repo-access-token: ${{ secrets.GITHUB_TOKEN }}
tests:
name: Tests / ${{ matrix.go-version || 'go.mod' }}
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
go-version:
- "" # leave empty to use go-version-file (go.mod)
- oldstable
- stable
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: src/github.com/containerd/log
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: ${{ matrix.go-version }}
go-version-file: src/github.com/containerd/log/go.mod # used when go-version is empty
cache: false # see actions/setup-go#368
- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- name: Test
run: go test -v -race
working-directory: src/github.com/containerd/log
- name: Test otel
run: go test -v -race
working-directory: src/github.com/containerd/log/otel