Updated all imports to v2 #71
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
pull_request: | |
# edtited - because base branch can be modified | |
# synchronize - update commits on PR | |
types: [opened, synchronize, edited] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
name: Tests, ${{ matrix.os }} | |
steps: | |
- name: Fix CRLF on Windows | |
if: runner.os == 'Windows' | |
run: git config --global core.autocrlf false | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
# Increase the pagefile size on Windows to aviod running out of memory | |
- name: Increase pagefile size on Windows | |
if: runner.os == 'Windows' | |
run: powershell -command .github\workflows\SetPageFileSize.ps1 | |
# Increase the swap size on Linux to aviod running out of memory | |
- name: Increase swap size on Linux | |
if: runner.os == 'Linux' | |
uses: thejerrybao/setup-swap-space@v1 | |
with: | |
swap-size-gb: 12 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Test | |
shell: bash | |
env: | |
NO_PARALLEL: 1 | |
run: ./build_and_test.sh | |
stability-test-fast: | |
runs-on: ubuntu-latest | |
name: Fast stability tests | |
steps: | |
# Increase the swap size on Linux to aviod running out of memory | |
- name: Increase swap size on Linux | |
if: runner.os == 'Linux' | |
uses: thejerrybao/setup-swap-space@v1 | |
with: | |
swap-size-gb: 12 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install karlsend | |
run: go install ./... | |
- name: Run fast stability tests | |
working-directory: stability-tests | |
run: ./install_and_test.sh | |
coverage: | |
runs-on: ubuntu-latest | |
name: Produce code coverage | |
steps: | |
# Increase the swap size on Linux to aviod running out of memory | |
- name: Increase swap size on Linux | |
if: runner.os == 'Linux' | |
uses: thejerrybao/setup-swap-space@v1 | |
with: | |
swap-size-gb: 12 | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.21 | |
- name: Delete the stability tests from coverage | |
run: rm -r stability-tests | |
- name: Create coverage file | |
run: go test -timeout 120m -parallel=1 -v -covermode=atomic -coverpkg=./... -coverprofile coverage.txt ./... | |
- name: Upload coverage file | |
run: bash <(curl -s https://codecov.io/bash) |