54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
|
|
jobs:
|
|
compliance:
|
|
runs-on: lxc-bookworm
|
|
steps:
|
|
- uses: https://data.forgejo.org/actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
- uses: https://data.forgejo.org/actions/setup-go@v5
|
|
with:
|
|
go-version-file: "go.mod"
|
|
|
|
- name: install jq make
|
|
run: |
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
apt-get -q install -qq -y jq make
|
|
|
|
- run: make deps-backend lint
|
|
|
|
- name: install hoverfly
|
|
run: |
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
apt-get -q install -qq -y unzip wget
|
|
version=$(./tests/run.sh hoverfly_version)
|
|
wget https://github.com/SpectoLabs/hoverfly/releases/download/v$version/hoverfly_bundle_linux_amd64.zip
|
|
unzip hoverfly_bundle_linux_amd64.zip
|
|
mv hoverfly hoverctl /usr/local/bin
|
|
|
|
- name: install zstd for actions/cache@v4
|
|
run: |
|
|
export DEBIAN_FRONTEND=noninteractive
|
|
apt-get -q install -y -qq zstd
|
|
|
|
- name: get GitLab version
|
|
id: gitlab
|
|
run: |
|
|
echo "version=$(./tests/run.sh gitlab_version)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: cache GitLab OCI image
|
|
uses: https://data.forgejo.org/actions/cache@v4
|
|
with:
|
|
path: |
|
|
/srv/forgejo-binaries/gitlab
|
|
key: gitlab-${{ steps.gitlab.outputs.version }}
|
|
|
|
- name: run tests
|
|
run: |
|
|
./tests/run.sh prepare_container
|
|
su forgejo -c "./tests/run.sh run"
|