This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/.github/workflows/test-universe.yml
Gerhard Lazu 15f156e8c7
Use more descriptive names for GitHub Checks
The existing checks didn't read well in the `gh` cli:

    ❯ gh pr checks
    All checks were successful
    0 failing, 7 successful, 0 skipped, and 0 pending checks

    ✓  DCO                                 https://probot.github.io/apps/dco/
    ✓  Docs                         6m37s  https://github.com/dagger/dagger/runs/5136044870?check_suite_focus=true
    ✓  Everything                   1m43s  https://github.com/dagger/dagger/runs/5136044863?check_suite_focus=true
    ✓  Integration                  4m10s  https://github.com/dagger/dagger/runs/5136044871?check_suite_focus=true
    ✓  Universe                     11m6s  https://github.com/dagger/dagger/runs/5136044860?check_suite_focus=true
    ✓  Universe - Europa            3m18s  https://github.com/dagger/dagger/runs/5136044932?check_suite_focus=true
    ✓  netlify/devel-docs-dagge...         https://app.netlify.com/sites/devel-docs-dagger-io/deploys/620499ee88ee240008b6cabf

This change gives them more descriptive names:

    ❯ gh pr checks
    All checks were successful
    0 failing, 8 successful, 0 skipped, and 0 pending checks

    ✓  DCO                                             https://probot.github.io/apps/dco/
    ✓  Integration Tests                       4m22s   https://github.com/dagger/dagger/runs/5139842686?check_suite_focus=true
    ✓  Lint                                    1m29s   https://github.com/dagger/dagger/runs/5139842774?check_suite_focus=true
    ✓  Test Docs                               7m44s   https://github.com/dagger/dagger/runs/5139842682?check_suite_focus=true
    ✓  Unit Tests                              2m11s   https://github.com/dagger/dagger/runs/5139842684?check_suite_focus=true
    ✓  Universe Tests                          13m14s  https://github.com/dagger/dagger/runs/5139842932?check_suite_focus=true
    ✓  Universe Tests - Europa                 2m36s   https://github.com/dagger/dagger/runs/5139842678?check_suite_focus=true
    ✓  netlify/devel-docs-dagger-io/deploy...          https://deploy-preview-1593--devel-docs-dagger-io.netlify.app

Signed-off-by: Gerhard Lazu <gerhard@lazu.co.uk>
2022-02-10 11:31:21 +00:00

122 lines
3.2 KiB
YAML

name: "Test Universe"
on:
push:
branches: [main]
paths:
- '**.sh'
- '**.bash'
- '**.go'
- '**.cue'
- 'Makefile'
- 'go.mod'
- 'go.sum'
- '.github/workflows/test-universe.yml'
pull_request:
branches: [main]
paths:
- '**.sh'
- '**.bash'
- '**.go'
- '**.cue'
- 'Makefile'
- 'go.mod'
- 'go.sum'
- '.github/workflows/test-universe.yml'
jobs:
universe-tests:
name: "Universe Tests"
runs-on: ubuntu-latest
timeout-minutes: 30
services:
localstack:
image: localstack/localstack:0.12.16
env:
SERVICES: s3, ecr
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
ports:
- 4566:4566
- 4571:4571
- 4510:4510
options: >-
--health-cmd "curl -f http://localhost:4566/health"
--health-start-period 5s
--health-timeout 5s
--health-interval 5s
--health-retries 10
steps:
- name: "Check out"
uses: actions/checkout@v2
- name: "Setup Go"
uses: actions/setup-go@v1
with:
go-version: 1.16
- name: "Setup KiND"
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: "Provision Localstack AWS resources"
env:
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_DEFAULT_REGION: us-east-2
run: |
aws --endpoint-url=http://localhost:4566 s3 mb s3://dagger-ci
aws --endpoint-url=http://localhost:4566 ecr create-repository --repository-name dagger-ci
- name: "Expose GitHub Runtime"
uses: crazy-max/ghaction-github-runtime@v1
- name: Test
# TODO: https://github.com/dagger/dagger/pull/1341
# env:
# DAGGER_CACHE_TO: "type=gha,mode=max,scope=test-universe"
# DAGGER_CACHE_FROM: "type=gha,mode=max,scope=test-universe"
run: |
make universe-test
universe-europa-tests:
name: "Universe Tests - Europa"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: "Check out"
uses: actions/checkout@v2
- name: "Set up Go"
uses: actions/setup-go@v1
with:
go-version: 1.16
- name: "Install SOPS"
run: |
sudo curl -L -o /usr/local/bin/sops https://github.com/mozilla/sops/releases/download/v3.7.1/sops-v3.7.1.linux
sudo chmod +x /usr/local/bin/sops
- name: "Import Dagger private key"
env:
DAGGER_AGE_KEY: ${{ secrets.DAGGER_AGE_KEY }}
run: |
mkdir -p ~/.config/sops/age
echo "$DAGGER_AGE_KEY" > ~/.config/sops/age/keys.txt
- name: "Expose GitHub Runtime"
uses: crazy-max/ghaction-github-runtime@v1
- name: Test
env:
DAGGER_CACHE_TO: "type=gha,mode=max,scope=test-universe"
DAGGER_CACHE_FROM: "type=gha,mode=max,scope=test-universe"
run: |
make europa-universe-test