name: test

on:
  push:
    branches:
      - 'master'
  pull_request:
    branches:
      - 'master'

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v3
      -
        name: Validate
        uses: docker/bake-action@v1
        with:
          targets: validate
      -
        name: Test
        uses: docker/bake-action@v1
        with:
          targets: test
      -
        name: Upload coverage
        uses: codecov/codecov-action@v2
        with:
          file: ./coverage/clover.xml