Skip to content

Commit

Permalink
Add github CI flow
Browse files Browse the repository at this point in the history
Signed-off-by: Derek McGowan <derek@mcg.dev>
  • Loading branch information
dmcgowan committed Sep 8, 2023
1 parent 7e13034 commit fb7fe3d
Showing 1 changed file with 84 additions and 0 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,84 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:

checks:
name: Project Checks
runs-on: ubuntu-22.04
timeout-minutes: 5

steps:
- uses: actions/setup-go@v2
with:
go-version: 1.20.x

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/checkout@v2
with:
path: src/github.com/containerd/log
fetch-depth: 25

- uses: containerd/project-checks@v1
with:
working-directory: src/github.com/containerd/log

linters:
name: Linters
runs-on: ${{ matrix.os }}
timeout-minutes: 10

strategy:
matrix:
go-version: [1.20.x]
os: [ubuntu-22.04]

steps:
- uses: actions/checkout@v2
with:
path: src/github.com/containerd/log

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: golangci/golangci-lint-action@v2
with:
version: v1.29
working-directory: src/github.com/containerd/log

tests:
name: Tests
runs-on: ubuntu-22.04
timeout-minutes: 5

steps:
- uses: actions/checkout@v2
with:
path: src/github.com/containerd/log

- uses: actions/setup-go@v2
with:
go-version: 1.20.x

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- run: |
go test -v -race
working-directory: src/github.com/containerd/log

0 comments on commit fb7fe3d

Please sign in to comment.