Skip to content

⚗️ Introducing experimental version of safedown (#33) #90

⚗️ Introducing experimental version of safedown (#33)

⚗️ Introducing experimental version of safedown (#33) #90

Workflow file for this run

name: go
# Controls when the workflows will run
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# The 'test' job runs all the go tests
test:
name: test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Test
run: go test -v -count=1 -timeout=10s ./...
# The 'test' job runs all the go tests
test_os:
strategy:
matrix:
os: ['ubuntu-22.04', 'ubuntu-20.04']
go-version: ['1.19', '1.20']
name: test go${{ matrix.go-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Test
run: go test -v -count=1 -timeout=10s ./...
# The 'examples' package builds all the examples
examples:
name: examples
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.19
- name: Change to examples module
run: cd ./examples
- name: Build examples
working-directory: ./examples
run: go build -v -o ./outputs/ ./...
# The 'lint' job runs the linter
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: 1.19
# Equivalent of locally running the command 'golangci-lint run'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.51.2