File: test.yml

package info (click to toggle)
golang-github-docker-cli-docs-tool 0.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 424 kB
  • sloc: makefile: 4
file content (74 lines) | stat: -rw-r--r-- 1,432 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: test

on:
  push:
    branches:
      - 'main'
      - 'releases/v*'
    tags:
      - 'v*'
  pull_request:

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
      -
        name: Run
        uses: docker/bake-action@v5
        with:
          targets: validate

  test:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
      -
        name: Run
        uses: docker/bake-action@v5
        with:
          targets: test
      -
        name: Upload coverage
        uses: codecov/codecov-action@v4
        with:
          file: ./coverage.txt
          token: ${{ secrets.CODECOV_TOKEN }}

  example:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
      -
        name: Set up Go
        uses: actions/setup-go@v5
        with:
          go-version: "1.20"
      -
        name: Download modules
        run: |
          go mod download
        working-directory: ./example
      -
        name: Run
        run: |
          go run main.go
        working-directory: ./example
      -
        name: List docs
        run: |
          tree -nh ./example/docs
      -
        name: Upload docs
        uses: actions/upload-artifact@v4
        with:
          name: example-docs
          path: ./example/docs/*
          if-no-files-found: error