They are commonly used for documentation purposes and never evaluated. <!--start release-notes-assistant--> <!--URL:https://code.forgejo.org/forgejo/runner--> - bug fixes - [PR](https://code.forgejo.org/forgejo/runner/pulls/770): <!--number 770 --><!--line 0 --><!--description Zml4OiBhbGxvdyBleHByZXNzaW9ucyBpbiBhY3Rpb24gZGVzY3JpcHRpb25zIGFuZCBpbmNvbXBsZXRlIGFjdGlvbiBpbnB1dHM=-->fix: allow expressions in action descriptions and incomplete action inputs<!--description--> <!--end release-notes-assistant--> Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/770 Co-authored-by: Earl Warren <contact@earl-warren.org> Co-committed-by: Earl Warren <contact@earl-warren.org>
78 lines
2.1 KiB
YAML
78 lines
2.1 KiB
YAML
name: act
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
pull_request:
|
|
|
|
env:
|
|
GOPROXY: https://goproxy.io,direct
|
|
GOPATH: /go_path
|
|
GOCACHE: /go_cache
|
|
|
|
jobs:
|
|
unit:
|
|
runs-on: docker
|
|
container:
|
|
image: 'code.forgejo.org/oci/node:22-bookworm'
|
|
steps:
|
|
- name: cache go path
|
|
id: cache-go-path
|
|
uses: https://code.forgejo.org/actions/cache@v4
|
|
with:
|
|
path: /go_path
|
|
key: go_path-${{ forge.repository }}-${{ forge.ref_name }}
|
|
restore-keys: |
|
|
go_path-${{ forge.repository }}-
|
|
go_path-
|
|
- name: cache go cache
|
|
id: cache-go-cache
|
|
uses: https://code.forgejo.org/actions/cache@v4
|
|
with:
|
|
path: /go_cache
|
|
key: go_cache-${{ forge.repository }}-${{ forge.ref_name }}
|
|
restore-keys: |
|
|
go_cache-${{ forge.repository }}-
|
|
go_cache-
|
|
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
- uses: https://code.forgejo.org/actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: validate go version
|
|
run: |
|
|
set -ex
|
|
toolchain=$(grep -oP '(?<=toolchain ).+' go.mod)
|
|
version=$(go version | cut -d' ' -f3)
|
|
if dpkg --compare-versions ${version#go} lt ${toolchain#go}; then
|
|
echo "go version too low: $toolchain >= $version"
|
|
exit 1
|
|
fi
|
|
|
|
- name: unit test
|
|
run: |
|
|
go test -short ./act/container
|
|
go test ./act/artifactcache/... ./act/workflowpattern/... ./act/filecollector/... ./act/common/... ./act/jobparser ./act/model ./act/exprparser ./act/schema
|
|
|
|
integration:
|
|
runs-on: lxc-bookworm
|
|
needs: [unit]
|
|
steps:
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
|
|
|
- uses: https://code.forgejo.org/actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: apt install docker.io
|
|
run: |
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
apt-get update -qq
|
|
apt-get -q install -qq -y docker.io
|
|
|
|
- name: integration test
|
|
run: |
|
|
go test ./act/container
|
|
go test ./act/runner/...
|