github.com/nektos/act@v0.2.63/.github/workflows/checks.yml (about) 1 name: checks 2 on: [pull_request, workflow_dispatch] 3 4 concurrency: 5 cancel-in-progress: true 6 group: ${{ github.workflow }}-${{ github.ref }} 7 8 env: 9 ACT_OWNER: ${{ github.repository_owner }} 10 ACT_REPOSITORY: ${{ github.repository }} 11 CGO_ENABLED: 0 12 13 jobs: 14 lint: 15 name: lint 16 runs-on: ubuntu-latest 17 steps: 18 - uses: actions/checkout@v4 19 with: 20 fetch-depth: 0 21 - uses: actions/setup-go@v5 22 with: 23 go-version-file: go.mod 24 check-latest: true 25 - uses: golangci/golangci-lint-action@v6.0.1 26 with: 27 version: v1.53 28 only-new-issues: true 29 - uses: megalinter/megalinter/flavors/go@v7.11.1 30 env: 31 DEFAULT_BRANCH: master 32 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 33 VALIDATE_ALL_CODEBASE: false 34 GITHUB_STATUS_REPORTER: ${{ !env.ACT }} 35 GITHUB_COMMENT_REPORTER: ${{ !env.ACT }} 36 37 test-linux: 38 name: test-linux 39 runs-on: ubuntu-latest 40 steps: 41 - uses: actions/checkout@v4 42 with: 43 fetch-depth: 2 44 - name: Set up QEMU 45 uses: docker/setup-qemu-action@v3 46 - uses: actions/setup-go@v5 47 with: 48 go-version-file: go.mod 49 check-latest: true 50 - uses: actions/cache@v4 51 if: ${{ !env.ACT }} 52 with: 53 path: ~/go/pkg/mod 54 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 55 restore-keys: | 56 ${{ runner.os }}-go- 57 - name: Run Tests 58 uses: ./.github/actions/run-tests 59 with: 60 upload-logs-name: logs-linux 61 - name: Run act from cli 62 run: go run main.go -P ubuntu-latest=node:16-buster-slim -C ./pkg/runner/testdata/ -W ./basic/push.yml 63 - name: Upload Codecov report 64 uses: codecov/codecov-action@v4 65 with: 66 files: coverage.txt 67 fail_ci_if_error: true # optional (default = false) 68 token: ${{ secrets.CODECOV_TOKEN }} 69 70 test-host: 71 strategy: 72 matrix: 73 os: 74 - windows-latest 75 - macos-latest 76 name: test-${{matrix.os}} 77 runs-on: ${{matrix.os}} 78 steps: 79 - uses: actions/checkout@v4 80 with: 81 fetch-depth: 2 82 - uses: actions/setup-go@v5 83 with: 84 go-version-file: go.mod 85 check-latest: true 86 - name: Run Tests 87 uses: ./.github/actions/run-tests 88 with: 89 filter: '^TestRunEventHostEnvironment$' 90 upload-logs-name: logs-${{ matrix.os }} 91 92 snapshot: 93 name: snapshot 94 runs-on: ubuntu-latest 95 steps: 96 - uses: actions/checkout@v4 97 - uses: actions/setup-go@v5 98 with: 99 go-version-file: go.mod 100 check-latest: true 101 - uses: actions/cache@v4 102 if: ${{ !env.ACT }} 103 with: 104 path: ~/go/pkg/mod 105 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 106 restore-keys: | 107 ${{ runner.os }}-go- 108 - name: GoReleaser 109 uses: goreleaser/goreleaser-action@v5 110 with: 111 version: latest 112 args: release --snapshot --clean 113 - name: Capture x86_64 (64-bit) Linux binary 114 if: ${{ !env.ACT }} 115 uses: actions/upload-artifact@v4 116 with: 117 name: act-linux-amd64 118 path: dist/act_linux_amd64_v1/act 119 - name: Capture i386 (32-bit) Linux binary 120 if: ${{ !env.ACT }} 121 uses: actions/upload-artifact@v4 122 with: 123 name: act-linux-i386 124 path: dist/act_linux_386/act 125 - name: Capture arm64 (64-bit) Linux binary 126 if: ${{ !env.ACT }} 127 uses: actions/upload-artifact@v4 128 with: 129 name: act-linux-arm64 130 path: dist/act_linux_arm64/act 131 - name: Capture armv6 (32-bit) Linux binary 132 if: ${{ !env.ACT }} 133 uses: actions/upload-artifact@v4 134 with: 135 name: act-linux-armv6 136 path: dist/act_linux_arm_6/act 137 - name: Capture armv7 (32-bit) Linux binary 138 if: ${{ !env.ACT }} 139 uses: actions/upload-artifact@v4 140 with: 141 name: act-linux-armv7 142 path: dist/act_linux_arm_7/act 143 - name: Capture x86_64 (64-bit) Windows binary 144 if: ${{ !env.ACT }} 145 uses: actions/upload-artifact@v4 146 with: 147 name: act-windows-amd64 148 path: dist/act_windows_amd64_v1/act.exe 149 - name: Capture i386 (32-bit) Windows binary 150 if: ${{ !env.ACT }} 151 uses: actions/upload-artifact@v4 152 with: 153 name: act-windows-i386 154 path: dist/act_windows_386/act.exe 155 - name: Capture arm64 (64-bit) Windows binary 156 if: ${{ !env.ACT }} 157 uses: actions/upload-artifact@v4 158 with: 159 name: act-windows-arm64 160 path: dist/act_windows_arm64/act.exe 161 - name: Capture armv7 (32-bit) Windows binary 162 if: ${{ !env.ACT }} 163 uses: actions/upload-artifact@v4 164 with: 165 name: act-windows-armv7 166 path: dist/act_windows_arm_7/act.exe 167 - name: Capture x86_64 (64-bit) MacOS binary 168 if: ${{ !env.ACT }} 169 uses: actions/upload-artifact@v4 170 with: 171 name: act-macos-amd64 172 path: dist/act_darwin_amd64_v1/act 173 - name: Capture arm64 (64-bit) MacOS binary 174 if: ${{ !env.ACT }} 175 uses: actions/upload-artifact@v4 176 with: 177 name: act-macos-arm64 178 path: dist/act_darwin_arm64/act 179 - name: Chocolatey 180 uses: ./.github/actions/choco 181 with: 182 version: v0.0.0-pr