Graphql Variables #1136
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
pull_request: | |
path-ignore: | |
- '.github/workflows/docs.yml' | |
- 'website/**' | |
branches: | |
- main | |
push: | |
path-ignore: | |
- '.github/workflows/docs.yml' | |
- 'website/**' | |
branches: | |
- main | |
schedule: | |
- cron: '30 8,18 * * *' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
grafana-version: [8.4.7] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Go environment | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21.0' | |
- name: Get go cache directory path | |
id: go-cache-paths | |
run: echo "::set-output name=go-mod::$(go env GOMODCACHE)" | |
- 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: Test backend | |
uses: magefile/mage-action@v2 | |
with: | |
version: latest | |
args: coverage | |
- name: Build backend | |
uses: magefile/mage-action@v2 | |
with: | |
version: latest | |
args: buildAll | |
- name: NodeJS Setup | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16.18.0 | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache yarn cache | |
uses: actions/cache@v3 | |
id: cache-yarn-cache | |
with: | |
path: | | |
~/.cache/Cypress | |
node_modules | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Cache node_modules | |
id: cache-node-modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-16.18.0-nodemodules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-16.18.0-nodemodules- | |
- name: Install dependencies | |
run: CYPRESS_CACHE_FOLDER=/home/runner/.cache/Cypress yarn install --frozen-lockfile; | |
if: | | |
steps.cache-yarn-cache.outputs.cache-hit != 'true' || | |
steps.cache-node-modules.outputs.cache-hit != 'true' | |
- name: Audit for vulnerabilities | |
run: | | |
yarn audit-ci; | |
- name: Spellcheck | |
run: | | |
yarn spellcheck; | |
- name: Build Frontend | |
run: | | |
NODE_OPTIONS=--max_old_space_size=8192 yarn ci-build; | |
- name: Start the docker container for e2e | |
run: | | |
docker-compose pull | |
docker-compose up -d | |
- name: wait for grafana to start | |
uses: nev7n/wait_for_response@v1 | |
with: | |
url: 'http://localhost:3000/' | |
responseCode: 200 | |
timeout: 20000 | |
interval: 500 | |
- name: Run E2E | |
run: yarn e2e | |
- name: Stop the docker container | |
if: always() | |
run: docker-compose down |