Skip to content

Honor quote preference for legacy-quoted scalars #1479

Honor quote preference for legacy-quoted scalars

Honor quote preference for legacy-quoted scalars #1479

Workflow file for this run

# Copyright 2025 The go-yaml Project Contributors
# SPDX-License-Identifier: Apache-2.0
name: Go
on:
push:
branches: [ main, v3, v2, v1 ]
pull_request:
branches: [ main, v3, v2, v1 ]
permissions: read-all
jobs:
test:
runs-on: ubuntu-latest
needs: go-versions
continue-on-error: true # make sure to run all versions, even if one fails
strategy:
fail-fast: false
matrix:
go-version: ${{ fromJSON(needs.go-versions.outputs.versions) }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with: {persist-credentials: false}
- name: Run all unit tests w/ -cover, all YTS tests and go lint
run: make test lint v=1 cover=1 GO-VERSION=${{ matrix.go-version }}
test-cross-platform:
name: Test on ${{ matrix.GOOS }}/${{ matrix.GOARCH }}
runs-on: ${{ matrix.os }}
continue-on-error: true # make sure to run all platforms, even if one fails
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
GOOS: darwin
GOARCH: amd64
test-args: -race
- os: macos-latest
GOOS: darwin
GOARCH: arm64
test-args: -race
- os: windows-latest
GOOS: windows
GOARCH: amd64
test-args: -race
- os: ubuntu-latest
GOOS: linux
GOARCH: 386
test-args: '' # race is not available on 32 bits architecture
- os: windows-latest
GOOS: windows
GOARCH: 386
test-args: '' # race is not available on 32 bits architecture
env:
GOARCH: ${{ matrix.GOARCH }}
GOOS: ${{ matrix.GOOS }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with: {persist-credentials: false}
- name: Run tests
run: |
bash -c 'echo + $OSTYPE + $MACHTYPE +'
make test-main test-internal v=1 o=${{ matrix.test-args }}
go-versions:
name: Lookup Go versions
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.latest-patch-versions.outputs.matrix }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Get latest patch for each minor version
# yamllint disable-line rule:line-length
uses: arnested/go-version-action@6a9d1e0bcc9db5b1693bb7b0ad37491d205f67b6 # v2.1.4
id: latest-patch-versions
with:
latest-patches-only: true
patch-level: true