2022-01-04 02:54:27 +00:00
|
|
|
name: coder
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- "release/*"
|
|
|
|
tags:
|
|
|
|
- "*"
|
|
|
|
|
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-01-29 23:45:42 +00:00
|
|
|
- "*"
|
2022-01-04 02:54:27 +00:00
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
actions: none
|
|
|
|
checks: none
|
|
|
|
contents: read
|
|
|
|
deployments: none
|
|
|
|
issues: none
|
|
|
|
packages: none
|
|
|
|
pull-requests: none
|
|
|
|
repository-projects: none
|
|
|
|
security-events: none
|
|
|
|
statuses: none
|
|
|
|
|
2022-02-01 00:13:33 +00:00
|
|
|
# Cancel in-progress runs for pull requests when developers push
|
|
|
|
# additional changes
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
|
2022-01-04 02:54:27 +00:00
|
|
|
jobs:
|
2022-01-05 14:48:56 +00:00
|
|
|
style-lint-golangci:
|
|
|
|
name: style/lint/golangci
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-02 14:25:14 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-28 14:38:51 +00:00
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: "^1.17"
|
2022-01-05 14:48:56 +00:00
|
|
|
- name: golangci-lint
|
2022-02-28 14:38:51 +00:00
|
|
|
uses: golangci/golangci-lint-action@v3.1.0
|
2022-01-05 14:48:56 +00:00
|
|
|
with:
|
2022-01-25 16:04:25 +00:00
|
|
|
version: v1.43.0
|
2022-01-05 14:48:56 +00:00
|
|
|
|
2022-01-21 06:00:14 +00:00
|
|
|
style-lint-typescript:
|
|
|
|
name: "style/lint/typescript"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-02 14:25:14 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-01-21 06:00:14 +00:00
|
|
|
|
|
|
|
- name: Cache Node
|
|
|
|
id: cache-node
|
2022-03-21 23:57:11 +00:00
|
|
|
uses: actions/cache@v3
|
2022-01-21 06:00:14 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
**/node_modules
|
|
|
|
.eslintcache
|
|
|
|
key: js-${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }}
|
2022-03-14 18:49:49 +00:00
|
|
|
restore-keys: |
|
|
|
|
js-${{ runner.os }}-
|
2022-01-21 06:00:14 +00:00
|
|
|
|
|
|
|
- name: Install node_modules
|
2022-02-20 17:42:50 +00:00
|
|
|
run: ./scripts/yarn_install.sh
|
2022-01-21 06:00:14 +00:00
|
|
|
|
|
|
|
- name: "yarn lint"
|
|
|
|
run: yarn lint
|
2022-02-01 21:34:43 +00:00
|
|
|
working-directory: site
|
2022-01-21 06:00:14 +00:00
|
|
|
|
2022-01-08 17:24:02 +00:00
|
|
|
gen:
|
|
|
|
name: "style/gen"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-02 14:25:14 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-08 17:24:02 +00:00
|
|
|
- name: Install Protoc
|
|
|
|
uses: arduino/setup-protoc@v1
|
|
|
|
with:
|
2022-03-17 23:10:46 +00:00
|
|
|
version: "3.19.4"
|
2022-01-08 17:24:02 +00:00
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: "^1.17"
|
2022-02-03 22:10:21 +00:00
|
|
|
- run: curl -sSL
|
2022-01-08 17:24:02 +00:00
|
|
|
https://github.com/kyleconroy/sqlc/releases/download/v1.11.0/sqlc_1.11.0_linux_amd64.tar.gz
|
|
|
|
| sudo tar -C /usr/bin -xz sqlc
|
|
|
|
|
|
|
|
- run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
|
|
|
|
- run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.26
|
|
|
|
- run: "make --output-sync -j gen"
|
|
|
|
- run: ./scripts/check_unstaged.sh
|
|
|
|
|
2022-02-07 23:25:50 +00:00
|
|
|
style-fmt:
|
|
|
|
name: "style/fmt"
|
2022-01-04 02:54:27 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-03-02 14:25:14 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-01-04 02:54:27 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
submodules: true
|
|
|
|
|
|
|
|
- name: Cache Node
|
|
|
|
id: cache-node
|
2022-03-21 23:57:11 +00:00
|
|
|
uses: actions/cache@v3
|
2022-01-04 02:54:27 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
**/node_modules
|
|
|
|
.eslintcache
|
|
|
|
key: js-${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }}
|
2022-03-14 18:49:49 +00:00
|
|
|
restore-keys: |
|
|
|
|
js-${{ runner.os }}-
|
2022-01-04 02:54:27 +00:00
|
|
|
|
|
|
|
- name: Install node_modules
|
2022-02-20 17:42:50 +00:00
|
|
|
run: ./scripts/yarn_install.sh
|
2022-01-04 02:54:27 +00:00
|
|
|
|
2022-02-07 23:25:50 +00:00
|
|
|
- name: "make fmt"
|
|
|
|
run: "make --output-sync -j fmt"
|
2022-01-04 02:54:27 +00:00
|
|
|
|
|
|
|
test-go:
|
|
|
|
name: "test/go"
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
2022-02-19 04:06:56 +00:00
|
|
|
- windows-2022
|
2022-01-04 02:54:27 +00:00
|
|
|
steps:
|
2022-03-02 14:25:14 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-04 02:54:27 +00:00
|
|
|
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: "^1.17"
|
|
|
|
|
2022-03-22 22:09:04 +00:00
|
|
|
- name: Echo Go Cache Paths
|
|
|
|
id: go-cache-paths
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=go-build::$(go env GOCACHE)"
|
|
|
|
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
|
|
|
|
|
|
|
|
- name: Go Build Cache
|
|
|
|
uses: actions/cache@v3
|
2022-01-11 15:28:41 +00:00
|
|
|
with:
|
2022-03-22 22:09:04 +00:00
|
|
|
path: ${{ steps.go-cache-paths.outputs.go-build }}
|
|
|
|
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
2022-01-11 15:28:41 +00:00
|
|
|
|
2022-03-22 22:09:04 +00:00
|
|
|
- name: Go Mod Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
|
|
|
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
|
|
|
|
|
|
|
|
- name: Install goreleaser
|
|
|
|
uses: jaxxstorm/action-install-gh-release@v1.4.0
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
repo: gotestyourself/gotestsum
|
|
|
|
tag: v1.7.0
|
2022-01-05 14:48:56 +00:00
|
|
|
|
2022-01-31 02:11:18 +00:00
|
|
|
- uses: hashicorp/setup-terraform@v1
|
|
|
|
with:
|
|
|
|
terraform_version: 1.1.2
|
|
|
|
terraform_wrapper: false
|
|
|
|
|
2022-01-22 21:58:26 +00:00
|
|
|
- name: Test with Mock Database
|
2022-02-19 04:06:56 +00:00
|
|
|
shell: bash
|
|
|
|
env:
|
2022-03-22 19:17:50 +00:00
|
|
|
GOCOUNT: ${{ runner.os == 'Windows' && 1 || 2 }}
|
2022-02-19 04:06:56 +00:00
|
|
|
GOMAXPROCS: ${{ runner.os == 'Windows' && 1 || 2 }}
|
2022-02-05 00:24:58 +00:00
|
|
|
run: gotestsum --junitfile="gotests.xml" --packages="./..." --
|
|
|
|
-covermode=atomic -coverprofile="gotests.coverage"
|
2022-03-07 17:40:54 +00:00
|
|
|
-coverpkg=./...,github.com/coder/coder/codersdk
|
2022-03-22 22:09:04 +00:00
|
|
|
-timeout=3m -count=$GOCOUNT -short -failfast
|
2022-01-05 14:48:56 +00:00
|
|
|
|
2022-02-07 17:32:32 +00:00
|
|
|
- name: Upload DataDog Trace
|
|
|
|
if: (success() || failure()) && github.actor != 'dependabot[bot]'
|
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
|
|
|
|
DD_DATABASE: fake
|
2022-03-02 17:26:53 +00:00
|
|
|
DD_CATEGORY: unit
|
2022-02-07 17:32:32 +00:00
|
|
|
GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
|
|
|
run: go run scripts/datadog-cireport/main.go gotests.xml
|
|
|
|
|
2022-03-22 22:09:04 +00:00
|
|
|
- uses: codecov/codecov-action@v2
|
|
|
|
if: github.actor != 'dependabot[bot]'
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
files: ./gotests.coverage
|
|
|
|
flags: unittest-go-${{ matrix.os }}
|
|
|
|
fail_ci_if_error: true
|
|
|
|
|
|
|
|
test-go-postgres:
|
|
|
|
name: "test/go/postgres"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: "^1.17"
|
|
|
|
|
|
|
|
- name: Echo Go Cache Paths
|
|
|
|
id: go-cache-paths
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=go-build::$(go env GOCACHE)"
|
|
|
|
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
|
|
|
|
|
|
|
|
- name: Go Build Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ${{ steps.go-cache-paths.outputs.go-build }}
|
|
|
|
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
|
|
|
|
|
|
|
- name: Go Mod Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
|
|
|
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
|
|
|
|
|
|
|
|
- name: Install goreleaser
|
|
|
|
uses: jaxxstorm/action-install-gh-release@v1.4.0
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
repo: gotestyourself/gotestsum
|
|
|
|
tag: v1.7.0
|
|
|
|
|
|
|
|
- uses: hashicorp/setup-terraform@v1
|
|
|
|
with:
|
|
|
|
terraform_version: 1.1.2
|
|
|
|
terraform_wrapper: false
|
|
|
|
|
|
|
|
- name: Start PostgreSQL Database
|
|
|
|
env:
|
|
|
|
POSTGRES_PASSWORD: postgres
|
|
|
|
POSTGRES_USER: postgres
|
|
|
|
POSTGRES_DB: postgres
|
|
|
|
PGDATA: /tmp
|
|
|
|
run: |
|
|
|
|
docker run \
|
|
|
|
-e POSTGRES_PASSWORD=postgres \
|
|
|
|
-e POSTGRES_USER=postgres \
|
|
|
|
-e POSTGRES_DB=postgres \
|
|
|
|
-e PGDATA=/tmp \
|
|
|
|
-p 5432:5432 \
|
|
|
|
-d postgres:11 \
|
|
|
|
-c shared_buffers=1GB \
|
|
|
|
-c max_connections=1000
|
|
|
|
while ! pg_isready -h 127.0.0.1
|
|
|
|
do
|
|
|
|
echo "$(date) - waiting for database to start"
|
|
|
|
sleep 0.5
|
|
|
|
done
|
|
|
|
|
2022-01-22 21:58:26 +00:00
|
|
|
- name: Test with PostgreSQL Database
|
2022-03-22 22:09:04 +00:00
|
|
|
run: DB=ci gotestsum --junitfile="gotests.xml" --packages="./..." --
|
2022-01-22 21:58:26 +00:00
|
|
|
-covermode=atomic -coverprofile="gotests.coverage" -timeout=3m
|
2022-03-07 17:40:54 +00:00
|
|
|
-coverpkg=./...,github.com/coder/coder/codersdk
|
2022-03-22 22:09:04 +00:00
|
|
|
-count=1 -parallel=2 -race -failfast
|
2022-01-22 21:58:26 +00:00
|
|
|
|
2022-02-05 00:24:58 +00:00
|
|
|
- name: Upload DataDog Trace
|
2022-03-22 22:09:04 +00:00
|
|
|
if: (success() || failure()) && github.actor != 'dependabot[bot]'
|
2022-02-05 00:24:58 +00:00
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
|
2022-02-07 17:32:32 +00:00
|
|
|
DD_DATABASE: postgresql
|
|
|
|
GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
|
|
|
run: go run scripts/datadog-cireport/main.go gotests.xml
|
2022-02-05 00:24:58 +00:00
|
|
|
|
2022-03-23 15:03:28 +00:00
|
|
|
- uses: codecov/codecov-action@v2
|
|
|
|
if: github.actor != 'dependabot[bot]'
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
files: ./gotests.coverage
|
|
|
|
flags: unittest-go-${{ matrix.os }}
|
|
|
|
fail_ci_if_error: true
|
|
|
|
|
2022-02-07 23:25:50 +00:00
|
|
|
deploy:
|
|
|
|
name: "deploy"
|
|
|
|
runs-on: ubuntu-latest
|
2022-02-18 17:07:28 +00:00
|
|
|
if: github.event_name != 'pull_request'
|
2022-02-07 23:25:50 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
steps:
|
2022-03-02 14:25:14 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-07 23:25:50 +00:00
|
|
|
|
|
|
|
- name: Authenticate to Google Cloud
|
|
|
|
uses: google-github-actions/auth@v0
|
|
|
|
with:
|
|
|
|
workload_identity_provider: projects/477254869654/locations/global/workloadIdentityPools/github/providers/github
|
2022-02-08 00:18:52 +00:00
|
|
|
service_account: github-coder@coder-ci.iam.gserviceaccount.com
|
2022-02-07 23:25:50 +00:00
|
|
|
|
|
|
|
- name: Set up Google Cloud SDK
|
|
|
|
uses: google-github-actions/setup-gcloud@v0
|
|
|
|
|
|
|
|
- name: Configure Docker for Google Artifact Registry
|
|
|
|
run: gcloud auth configure-docker us-docker.pkg.dev
|
|
|
|
|
2022-02-25 16:12:52 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2022-02-07 23:25:50 +00:00
|
|
|
with:
|
|
|
|
node-version: "14"
|
|
|
|
|
2022-02-20 17:42:50 +00:00
|
|
|
- name: Install node_modules
|
|
|
|
run: ./scripts/yarn_install.sh
|
2022-02-07 23:25:50 +00:00
|
|
|
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: "^1.17"
|
|
|
|
|
2022-03-08 04:22:47 +00:00
|
|
|
- uses: goreleaser/goreleaser-action@v2
|
|
|
|
with:
|
|
|
|
install-only: true
|
|
|
|
|
2022-02-07 23:25:50 +00:00
|
|
|
- run: make docker/image/coder
|
|
|
|
|
|
|
|
- run: docker push us-docker.pkg.dev/coder-blacktriangle-dev/ci/coder:latest
|
|
|
|
|
2022-02-08 00:18:52 +00:00
|
|
|
- name: Update coder service
|
2022-02-08 00:50:13 +00:00
|
|
|
run: gcloud run services update coder --image us-docker.pkg.dev/coder-blacktriangle-dev/ci/coder:latest --project coder-blacktriangle-dev --tag "git-$(git rev-parse --short HEAD)" --region us-central1
|
2022-02-08 00:18:52 +00:00
|
|
|
|
2022-01-04 02:54:27 +00:00
|
|
|
test-js:
|
|
|
|
name: "test/js"
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-03-02 14:25:14 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-04 02:54:27 +00:00
|
|
|
|
2022-01-13 17:11:52 +00:00
|
|
|
- name: Cache Node
|
|
|
|
id: cache-node
|
2022-03-21 23:57:11 +00:00
|
|
|
uses: actions/cache@v3
|
2022-01-13 17:11:52 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
**/node_modules
|
|
|
|
.eslintcache
|
|
|
|
key: js-${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }}
|
2022-03-14 18:49:49 +00:00
|
|
|
restore-keys: |
|
|
|
|
js-${{ runner.os }}-
|
2022-01-13 17:11:52 +00:00
|
|
|
|
2022-02-14 18:45:50 +00:00
|
|
|
# Go is required for uploading the test results to datadog
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: "^1.17"
|
|
|
|
|
2022-02-25 16:12:52 +00:00
|
|
|
- uses: actions/setup-node@v3
|
2022-01-04 02:54:27 +00:00
|
|
|
with:
|
|
|
|
node-version: "14"
|
|
|
|
|
2022-02-20 17:42:50 +00:00
|
|
|
- name: Install node_modules
|
|
|
|
run: ./scripts/yarn_install.sh
|
2022-01-12 22:25:12 +00:00
|
|
|
|
2022-02-20 17:42:50 +00:00
|
|
|
- name: Build frontend
|
|
|
|
run: yarn build
|
2022-02-01 21:34:43 +00:00
|
|
|
working-directory: site
|
2022-01-14 02:48:23 +00:00
|
|
|
|
2022-02-20 17:42:50 +00:00
|
|
|
- name: Build Storybook
|
|
|
|
run: yarn storybook:build
|
2022-02-04 16:36:58 +00:00
|
|
|
working-directory: site
|
|
|
|
|
2022-01-14 02:48:23 +00:00
|
|
|
- run: yarn test:coverage
|
2022-02-01 21:34:43 +00:00
|
|
|
working-directory: site
|
2022-01-14 02:48:23 +00:00
|
|
|
|
|
|
|
- uses: codecov/codecov-action@v2
|
2022-01-31 03:04:57 +00:00
|
|
|
if: github.actor != 'dependabot[bot]'
|
2022-01-14 02:48:23 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
2022-02-01 21:34:43 +00:00
|
|
|
files: ./site/coverage/lcov.info
|
2022-01-14 02:48:23 +00:00
|
|
|
flags: unittest-js
|
|
|
|
fail_ci_if_error: true
|
2022-02-14 18:45:50 +00:00
|
|
|
|
|
|
|
- name: Upload DataDog Trace
|
|
|
|
if: (success() || failure()) && github.actor != 'dependabot[bot]'
|
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
|
2022-03-02 17:26:53 +00:00
|
|
|
DD_CATEGORY: unit
|
|
|
|
GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
|
|
|
run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml
|
|
|
|
|
|
|
|
test-e2e:
|
|
|
|
name: "test/e2e/${{ matrix.os }}"
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
|
|
|
- ubuntu-latest
|
|
|
|
- macos-latest
|
|
|
|
# TODO: Get `make build` running on Windows 2022
|
|
|
|
# https://github.com/coder/coder/issues/384
|
|
|
|
# - windows-2022
|
|
|
|
steps:
|
2022-03-21 23:58:13 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-02 17:26:53 +00:00
|
|
|
|
|
|
|
- name: Cache Node
|
|
|
|
id: cache-node
|
2022-03-21 23:57:11 +00:00
|
|
|
uses: actions/cache@v3
|
2022-03-02 17:26:53 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
**/node_modules
|
|
|
|
.eslintcache
|
|
|
|
key: js-${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }}
|
2022-03-14 18:49:49 +00:00
|
|
|
restore-keys: |
|
|
|
|
js-${{ runner.os }}-
|
2022-03-02 17:26:53 +00:00
|
|
|
|
|
|
|
# Go is required for uploading the test results to datadog
|
|
|
|
- uses: actions/setup-go@v2
|
|
|
|
with:
|
|
|
|
go-version: "^1.17"
|
|
|
|
|
|
|
|
- uses: hashicorp/setup-terraform@v1
|
|
|
|
with:
|
|
|
|
terraform_version: 1.1.2
|
|
|
|
terraform_wrapper: false
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: "14"
|
|
|
|
|
2022-03-08 01:50:37 +00:00
|
|
|
- uses: goreleaser/goreleaser-action@v2
|
|
|
|
with:
|
|
|
|
install-only: true
|
|
|
|
|
2022-03-22 22:09:04 +00:00
|
|
|
- name: Echo Go Cache Paths
|
|
|
|
id: go-cache-paths
|
|
|
|
run: |
|
|
|
|
echo "::set-output name=go-build::$(go env GOCACHE)"
|
|
|
|
echo "::set-output name=go-mod::$(go env GOMODCACHE)"
|
|
|
|
|
|
|
|
- name: Go Build Cache
|
|
|
|
uses: actions/cache@v3
|
2022-03-02 17:26:53 +00:00
|
|
|
with:
|
2022-03-22 22:09:04 +00:00
|
|
|
path: ${{ steps.go-cache-paths.outputs.go-build }}
|
|
|
|
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }}
|
|
|
|
|
|
|
|
- name: Go Mod Cache
|
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ${{ steps.go-cache-paths.outputs.go-mod }}
|
|
|
|
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}
|
2022-03-02 17:26:53 +00:00
|
|
|
|
|
|
|
- run: make build
|
|
|
|
|
|
|
|
- run: yarn playwright:install
|
|
|
|
working-directory: site
|
|
|
|
|
|
|
|
- run: yarn playwright:install-deps
|
|
|
|
working-directory: site
|
|
|
|
|
|
|
|
- run: yarn playwright:test
|
2022-03-12 20:51:05 +00:00
|
|
|
env:
|
|
|
|
DEBUG: pw:api
|
2022-03-02 17:26:53 +00:00
|
|
|
working-directory: site
|
|
|
|
|
|
|
|
- name: Upload DataDog Trace
|
|
|
|
if: (success() || failure()) && github.actor != 'dependabot[bot]' && runner.os == 'Linux'
|
|
|
|
env:
|
|
|
|
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
|
|
|
|
DD_CATEGORY: e2e
|
2022-02-14 18:45:50 +00:00
|
|
|
GIT_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
|
2022-03-17 23:10:46 +00:00
|
|
|
run: go run scripts/datadog-cireport/main.go site/test-results/junit.xml
|