git » summer » main » tree

[main] / .github / workflows / tests.yaml

name: "tests"

on:
  push:
    branches: [ "main", "next" ]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [ "main", "next" ]
  schedule:
    - cron: '26 21 * * 6'

jobs:
  tests:
    runs-on: ubuntu-latest
    timeout-minutes: 7
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-go@v3
        with:
          go-version: ">=1.20"
      - name: install dependencies
        run: sudo apt install -y python3-cram xattr

      - name: test
        run: ./test/cover.sh
        timeout-minutes: 2

      - name: race
        run: ./test/race.sh
        timeout-minutes: 5

      - name: upload coverage codecov
        uses: codecov/codecov-action@v3
        with:
          files: test/.cover/cover.txt
        env:
          CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}