Skip to content

Bump github/codeql-action from 2 to 3 #40

Bump github/codeql-action from 2 to 3

Bump github/codeql-action from 2 to 3 #40

Workflow file for this run

---
name: CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
go:
- 1.11.x # debian buster
- 1.13.x # ubuntu focal
- 1.15.x # debian bullseye
- 1.x # latest
name: Go ${{ matrix.go }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Set up build dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y -q golint
- name: Set up GITHUB_ENV
run: >
go version |
sed 's/^go version /GOVERSION=/' |
tr ' /' '-' >>$GITHUB_ENV
go env GOPATH | sed 's/^/GOPATH=/' >>$GITHUB_ENV
go env GOCACHE | sed 's/^/GOCACHE=/' >>$GITHUB_ENV
- name: Set up Go cache
uses: actions/cache@v3
with:
path: |
${{ env.GOCACHE }}
${{ env.GOPATH }}/pkg/mod
key: ${{ env.GOVERSION }}-cache-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ env.GOVERSION }}-cache-
- name: Set up user directories
run: xdg-user-dirs-update
- name: Set up trash
run: |
mkdir -p "$HOME/.local/share/Trash/files"
touch "$HOME/.local/share/Trash/files/file.txt"
mkdir -p "$HOME/.local/share/Trash/info"
printf '[Trash Info]\nPath=%s\nDeletionDate=%s\n' "$HOME/file.txt" "$(date '+%Y-%m-%dT%H:%M:%S')" >"$HOME/.local/share/Trash/info/file.txt.trashinfo"
- run: golint github.com/rkoesters/xdg/...
- run: go build -v github.com/rkoesters/xdg/...
- run: go test -v -cover github.com/rkoesters/xdg/...
- run: go vet -v github.com/rkoesters/xdg/...