mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-29 12:08:24 +00:00
* Update test.yml * Update test.yml * Update test-required.yml * Update lint-required.yml * Update lint.yml
76 lines
2.2 KiB
YAML
76 lines
2.2 KiB
YAML
name: tester
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
paths:
|
|
- '**.go'
|
|
- 'go.*'
|
|
- '.github/workflows/test.yml'
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
branches:
|
|
- "main"
|
|
paths:
|
|
- '**.go'
|
|
- 'go.*'
|
|
- '.github/workflows/test.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
test:
|
|
if: github.event.pull_request.draft == false
|
|
name: runner / gotest
|
|
runs-on: ubuntu-22.04
|
|
container: ghcr.io/runatlantis/testing-env:latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- run: make test-all
|
|
- run: make check-fmt
|
|
|
|
# Check that there's no missing links for the website.
|
|
# This job builds the website, starts a server to serve it, and then uses
|
|
# muffet (https://github.com/raviqqe/muffet) to perform the link check.
|
|
website_link_check:
|
|
if: github.event.pull_request.draft == false
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version-file: .node-version
|
|
|
|
- name: run http-server
|
|
env:
|
|
# renovate: datasource=github-releases depName=raviqqe/muffet
|
|
MUFFET_VERSION: 2.6.3
|
|
run: |
|
|
npm install -g yarn
|
|
# http-server is used to serve the website locally as muffet checks it.
|
|
yarn global add http-server
|
|
# install raviqqe/muffet to check for broken links.
|
|
curl -L https://github.com/raviqqe/muffet/releases/download/v${MUFFET_VERSION}/muffet_${MUFFET_VERSION}_Linux_x86_64.tar.gz | tar -xz
|
|
yarn install
|
|
yarn website:build
|
|
http-server runatlantis.io/.vuepress/dist &
|
|
|
|
- name: wait until server listened
|
|
run: curl --retry-delay 1 --retry 30 --retry-all-error http://localhost:8080
|
|
|
|
- run: |
|
|
./muffet \
|
|
-e 'https://github\.com/runatlantis/atlantis/edit/main/.*' \
|
|
-e 'https://github.com/runatlantis/helm-charts#customization' \
|
|
--header 'Accept-Encoding:deflate, gzip' \
|
|
--buffer-size 8192 \
|
|
http://localhost:8080/
|