Skip to content

Update to Go 1.21

Update to Go 1.21 #95

Workflow file for this run

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@v3
with:
go-version: 1.21
- name: Set env
shell: bash
run: |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
with:
path: src/github.com/containerd/zfs
fetch-depth: 25
- uses: containerd/project-checks@v1
with:
working-directory: src/github.com/containerd/zfs
linters:
name: Linters
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
go-version: [1.21]
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v3
with:
path: src/github.com/containerd/zfs
- name: Set env
shell: bash
run: |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.os-version }}
- uses: actions/checkout@v3
- uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
skip-cache: true
args: --timeout=8m
tests:
name: Tests
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v3
with:
path: src/github.com/containerd/zfs
- uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Set env
shell: bash
run: |
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- run: |
sudo apt-get update && sudo apt-get install -y zfsutils-linux && sudo modprobe zfs
go test -race -covermode=atomic -c .
sudo ./zfs.test -test.root -test.v -test.coverprofile=coverage.txt
bash <(curl -s https://codecov.io/bash)
working-directory: src/github.com/containerd/zfs