name: Build and test jose2go project 

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

jobs:

  build-and-test:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [windows-latest, ubuntu-latest, macos-latest]
        version: ['1.20', '1.21', '1.22']
    steps:
    - name: Checkout library sources
      uses: actions/checkout@v3

    - name: Set up Go
      uses: actions/setup-go@v4
      with:
        go-version: ${{ matrix.version }}

    - name: Build
      run: go build -v ./...

    - name: Test
      run: go test ./...

