github.com/nektos/act@v0.2.83/.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 - uses: golangci/golangci-lint-action@v6.5.0 25 with: 26 version: v1.64.8 27 - uses: megalinter/megalinter/flavors/go@v8.4.2 28 env: 29 DEFAULT_BRANCH: master 30 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 31 VALIDATE_ALL_CODEBASE: false 32 GITHUB_STATUS_REPORTER: ${{ !env.ACT }} 33 GITHUB_COMMENT_REPORTER: ${{ !env.ACT }} 34 35 test-linux: 36 name: test-linux 37 runs-on: ubuntu-latest 38 steps: 39 - uses: actions/checkout@v4 40 with: 41 fetch-depth: 2 42 - name: Set up QEMU 43 uses: docker/setup-qemu-action@v3 44 - uses: actions/setup-go@v5 45 with: 46 go-version-file: go.mod 47 - name: Run Tests 48 run: go run gotest.tools/gotestsum@latest --junitfile unit-tests.xml --format pkgname -- -v -cover -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic -timeout 20m ./... 49 - name: Test Summary 50 uses: test-summary/action@v2 51 with: 52 paths: "unit-tests.xml" 53 if: always() 54 - name: Run act from cli 55 run: go run main.go -P ubuntu-latest=node:16-buster-slim -C ./pkg/runner/testdata/ -W ./basic/push.yml 56 - name: Run act from cli without docker support 57 run: go run -tags WITHOUT_DOCKER main.go -P ubuntu-latest=-self-hosted -C ./pkg/runner/testdata/ -W ./local-action-js/push.yml 58 - name: Upload Codecov report 59 uses: codecov/codecov-action@v5 60 with: 61 files: coverage.txt 62 fail_ci_if_error: true # optional (default = false) 63 token: ${{ secrets.CODECOV_TOKEN }} 64 65 test-host: 66 strategy: 67 matrix: 68 os: 69 - windows-latest 70 - macos-latest 71 name: test-host-${{matrix.os}} 72 runs-on: ${{matrix.os}} 73 steps: 74 - uses: actions/checkout@v4 75 with: 76 fetch-depth: 2 77 - uses: actions/setup-go@v5 78 with: 79 go-version-file: go.mod 80 - name: Run Tests 81 run: go run gotest.tools/gotestsum@latest --junitfile unit-tests.xml --format pkgname -- -v -cover -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic -timeout 20m -run ^TestRunEventHostEnvironment$ ./... 82 shell: bash 83 - name: Test Summary 84 uses: test-summary/action@v2 85 with: 86 paths: "unit-tests.xml" 87 if: always() 88 89 90 snapshot: 91 name: snapshot 92 runs-on: ubuntu-latest 93 steps: 94 - uses: actions/checkout@v4 95 - uses: actions/setup-go@v5 96 with: 97 go-version-file: go.mod 98 - name: GoReleaser 99 uses: goreleaser/goreleaser-action@v6 100 with: 101 version: latest 102 args: release --snapshot --clean 103 - name: Capture x86_64 (64-bit) Linux binary 104 if: ${{ !env.ACT }} 105 uses: actions/upload-artifact@v4 106 with: 107 name: act-linux-amd64 108 path: dist/act_linux_amd64_v1/act 109 - name: Capture i386 (32-bit) Linux binary 110 if: ${{ !env.ACT }} 111 uses: actions/upload-artifact@v4 112 with: 113 name: act-linux-i386 114 path: dist/act_linux_386/act 115 - name: Capture arm64 (64-bit) Linux binary 116 if: ${{ !env.ACT }} 117 uses: actions/upload-artifact@v4 118 with: 119 name: act-linux-arm64 120 path: dist/act_linux_arm64/act 121 - name: Capture armv6 (32-bit) Linux binary 122 if: ${{ !env.ACT }} 123 uses: actions/upload-artifact@v4 124 with: 125 name: act-linux-armv6 126 path: dist/act_linux_arm_6/act 127 - name: Capture armv7 (32-bit) Linux binary 128 if: ${{ !env.ACT }} 129 uses: actions/upload-artifact@v4 130 with: 131 name: act-linux-armv7 132 path: dist/act_linux_arm_7/act 133 - name: Capture riscv64 (64-bit) Linux binary 134 if: ${{ !env.ACT }} 135 uses: actions/upload-artifact@v4 136 with: 137 name: act-linux-riscv64 138 path: dist/act_linux_riscv64/act 139 - name: Capture x86_64 (64-bit) Windows binary 140 if: ${{ !env.ACT }} 141 uses: actions/upload-artifact@v4 142 with: 143 name: act-windows-amd64 144 path: dist/act_windows_amd64_v1/act.exe 145 - name: Capture i386 (32-bit) Windows binary 146 if: ${{ !env.ACT }} 147 uses: actions/upload-artifact@v4 148 with: 149 name: act-windows-i386 150 path: dist/act_windows_386/act.exe 151 - name: Capture arm64 (64-bit) Windows binary 152 if: ${{ !env.ACT }} 153 uses: actions/upload-artifact@v4 154 with: 155 name: act-windows-arm64 156 path: dist/act_windows_arm64/act.exe 157 - name: Capture armv7 (32-bit) Windows binary 158 if: ${{ !env.ACT }} 159 uses: actions/upload-artifact@v4 160 with: 161 name: act-windows-armv7 162 path: dist/act_windows_arm_7/act.exe 163 - name: Capture x86_64 (64-bit) MacOS binary 164 if: ${{ !env.ACT }} 165 uses: actions/upload-artifact@v4 166 with: 167 name: act-macos-amd64 168 path: dist/act_darwin_amd64_v1/act 169 - name: Capture arm64 (64-bit) MacOS binary 170 if: ${{ !env.ACT }} 171 uses: actions/upload-artifact@v4 172 with: 173 name: act-macos-arm64 174 path: dist/act_darwin_arm64/act 175 - name: Chocolatey 176 uses: ./.github/actions/choco 177 with: 178 version: v0.0.0-pr