2021-01-08 17:16:00 +01:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
2021-03-19 02:41:38 +01:00
|
|
|
lint:
|
|
|
|
name: Lint
|
2021-01-08 17:16:00 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-03-13 01:42:17 +01:00
|
|
|
- name: Check out
|
|
|
|
uses: actions/checkout@v2
|
2021-04-29 23:27:59 +02:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-03-13 01:42:17 +01:00
|
|
|
|
2021-03-18 23:30:00 +01:00
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.16
|
|
|
|
|
2021-03-13 02:24:52 +01:00
|
|
|
- name: Install Dependencies
|
|
|
|
run: |
|
2021-03-18 23:30:00 +01:00
|
|
|
# Cue
|
2021-03-13 02:24:52 +01:00
|
|
|
export CUE_VERSION="$(grep cue ./go.mod | cut -d' ' -f2)"
|
|
|
|
export CUE_TARBALL="cue_${CUE_VERSION}_linux_amd64.tar.gz"
|
|
|
|
echo "Installing cue version $CUE_VERSION"
|
|
|
|
curl -L https://github.com/cuelang/cue/releases/download/${CUE_VERSION}/${CUE_TARBALL} | sudo tar zxf - -C /usr/local/bin
|
|
|
|
|
2021-04-02 23:15:49 +02:00
|
|
|
- name: Go Lint
|
|
|
|
uses: golangci/golangci-lint-action@v2
|
|
|
|
with:
|
|
|
|
version: v1.39
|
|
|
|
skip-go-installation: true
|
|
|
|
args: --timeout=3m
|
|
|
|
|
2021-03-19 02:41:38 +01:00
|
|
|
- name: Lint
|
|
|
|
run: |
|
2021-07-19 16:26:18 +02:00
|
|
|
make shellcheck cuelint docslint
|
2021-03-19 02:41:38 +01:00
|
|
|
|
2021-05-22 00:02:18 +02:00
|
|
|
- name: Markdown Lint
|
2021-06-14 10:46:52 +02:00
|
|
|
uses: avto-dev/markdown-lint@v1
|
2021-05-22 00:02:18 +02:00
|
|
|
with:
|
2021-06-14 10:46:52 +02:00
|
|
|
config: ".markdownlint.yaml"
|
|
|
|
args: ./docs README.md
|
2021-05-22 00:02:18 +02:00
|
|
|
|
2021-03-19 02:41:38 +01:00
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
runs-on: ubuntu-latest
|
2021-04-08 03:50:18 +02:00
|
|
|
timeout-minutes: 30
|
2021-04-15 09:55:01 +02:00
|
|
|
steps:
|
|
|
|
- name: Check out
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.16
|
|
|
|
|
|
|
|
- name: Test
|
|
|
|
run: |
|
|
|
|
make test
|
|
|
|
|
|
|
|
integration:
|
|
|
|
name: Integration
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 30
|
2021-03-19 02:41:38 +01:00
|
|
|
steps:
|
|
|
|
- name: Check out
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
|
|
|
go-version: 1.16
|
|
|
|
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: |
|
2021-03-18 23:30:00 +01:00
|
|
|
# SOPS
|
2021-05-29 19:40:01 +02:00
|
|
|
sudo curl -L -o /usr/local/bin/sops https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux
|
2021-03-18 23:30:00 +01:00
|
|
|
sudo chmod +x /usr/local/bin/sops
|
|
|
|
|
2021-05-28 03:43:48 +02:00
|
|
|
- name: Import Dagger private key
|
|
|
|
env:
|
|
|
|
DAGGER_AGE_KEY: ${{ secrets.DAGGER_AGE_KEY }}
|
|
|
|
run: |
|
2021-05-29 11:33:40 +02:00
|
|
|
mkdir -p ~/.config/dagger
|
|
|
|
echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt
|
2021-05-28 03:43:48 +02:00
|
|
|
|
2021-01-14 22:50:54 +01:00
|
|
|
- name: Integration test
|
|
|
|
run: |
|
2021-07-23 16:05:49 +02:00
|
|
|
env
|
2021-07-01 18:47:32 +02:00
|
|
|
make core-integration
|
2021-04-15 09:19:17 +02:00
|
|
|
|
2021-07-01 18:47:32 +02:00
|
|
|
universe:
|
|
|
|
name: Universe
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
|
|
- name: Check out
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v1
|
2021-04-15 09:19:17 +02:00
|
|
|
with:
|
2021-07-01 18:47:32 +02:00
|
|
|
go-version: 1.16
|
|
|
|
|
|
|
|
- name: Setup Kind Kubernetes Cluster
|
|
|
|
uses: helm/kind-action@v1.2.0
|
|
|
|
|
|
|
|
- name: Import Dagger private key
|
|
|
|
env:
|
|
|
|
DAGGER_AGE_KEY: ${{ secrets.DAGGER_AGE_KEY }}
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.config/dagger
|
|
|
|
echo "$DAGGER_AGE_KEY" > ~/.config/dagger/keys.txt
|
|
|
|
|
|
|
|
- name: Universe Test
|
|
|
|
run: |
|
|
|
|
make universe-test
|
2021-07-02 11:23:12 +02:00
|
|
|
|
2021-08-23 10:13:27 +02:00
|
|
|
website:
|
2021-07-02 11:23:12 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cypress run
|
|
|
|
uses: cypress-io/github-action@v2
|
|
|
|
env:
|
|
|
|
REACT_APP_CLIENT_ID: 123
|
|
|
|
REACT_APP_CLIENT_SECRET: 123
|
|
|
|
REACT_APP_DAGGER_SITE_URI: https://dagger.io
|
|
|
|
REACT_APP_API_PROXY_ENABLE: false
|
|
|
|
REACT_APP_AMPLITUDE_ID: 123
|
|
|
|
with:
|
|
|
|
config: chromeWebSecurity=false
|
|
|
|
start: |
|
|
|
|
yarn start
|
|
|
|
yarn start:withAuth
|
|
|
|
working-directory: ./website
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: cypress-screenshots
|
|
|
|
path: website/cypress/screenshots
|
|
|
|
# Test run video was always captured, so this action uses "always()" condition
|
|
|
|
- uses: actions/upload-artifact@v1
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
name: cypress-videos
|
|
|
|
path: website/cypress/videos
|