name: CI

on:
  push:
    tags-ignore:
    - 'v*'
    branches:
    - "master"
  pull_request:
  workflow_call:
    secrets:
      CODECOV_TOKEN:
        required: true

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
  cancel-in-progress: true

permissions:
  contents: read

jobs:
  ci:
    permissions:
      actions: read
      contents: read
      security-events: write
    uses: smallstep/workflows/.github/workflows/goCI.yml@main
    with:
      only-latest-golang: false
      os-dependencies: 'libpcsclite-dev'
      run-codeql: true
      test-command: 'V=1 make test'
    secrets: inherit
