Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,6 @@ jobs:
# We don't run e2e tests on fork PRs because they don't have access to the secret env vars.
- run: if [ -z "${CIRCLE_PR_REPONAME}" ]; then ./scripts/e2e.sh; fi

# 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:
docker:
- image: cimg/node:18.13.0
environment:
# renovate: datasource=github-releases depName=raviqqe/muffet
MUFFET_VERSION: 2.6.3
steps:
- checkout
- run: |
# 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
- run: yarn install
- run: yarn website:build
- run:
name: http-server
command: http-server runatlantis.io/.vuepress/dist
background: true
- run:
name: wait until server listened
command: 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/

workflows:
version: 2
branch:
Expand All @@ -61,4 +28,3 @@ workflows:
# Ignore fork PRs since they don't have access to
# the atlantis-e2e-tests context (and also doc PRs).
ignore: /(pull\/\d+)|(docs\/.*)/
- website_link_check
52 changes: 44 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ on:
push:
branches:
- "main"
paths-ignore:
- 'runatlantis.io/**'
- '.github/**'
- '**/*.md'
paths:
- '**/*.go'
- '.github/workflows/test.yml'
pull_request:
types:
- opened
Expand All @@ -16,10 +15,9 @@ on:
- ready_for_review
branches:
- "main"
paths-ignore:
- 'runatlantis.io/**'
- '.github/**'
- '**/*.md'
paths:
- '**/*.go'
- '.github/workflows/test.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -35,3 +33,41 @@ jobs:
- 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/