fix: update dependencies and repair checks #5316
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: Cypress Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
cypress-tests: | |
runs-on: ubuntu-latest | |
env: | |
ENABLED_SPIES: none | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 'lts/gallium' | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.19.0' | |
- name: Cache go mod directories | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn | |
- run: yarn install --frozen-lockfile | |
- run: make --version | |
- run: make -j e2e-build | |
- name: Cypress run | |
uses: cypress-io/github-action@v4 | |
with: | |
wait-on: http://localhost:4040 | |
start: make server | |
config-file: cypress/cypress.json | |
env: | |
# keep the server quiet | |
PYROSCOPE_LOG_LEVEL: error | |
ENABLED_SPIES: none | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
cypress-tests-auth: | |
runs-on: ubuntu-latest | |
env: | |
ENABLED_SPIES: none | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.19.0' | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 'lts/gallium' | |
- name: Cache go mod directories | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn | |
- run: yarn install --frozen-lockfile | |
- run: make -j e2e-build | |
- name: Cypress run | |
uses: cypress-io/github-action@v4 | |
with: | |
wait-on: http://localhost:4040 | |
start: | | |
node ./scripts/oauth-mock/oauth-mock.js | |
make server SERVERPARAMS=--config=scripts/oauth-mock/pyroscope-config.yml | |
config-file: cypress/integration/auth/cypress.json | |
env: | |
# keep the server quiet | |
PYROSCOPE_LOG_LEVEL: error | |
ENABLED_SPIES: none | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
cypress-tests-base-url: | |
runs-on: ubuntu-latest | |
env: | |
ENABLED_SPIES: none | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.19.0' | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 'lts/gallium' | |
- name: Cache go mod directories | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn | |
- run: yarn install --frozen-lockfile | |
- run: make -j e2e-build | |
- name: run nginx with /pyroscope | |
run: docker-compose -f cypress/base-url/base-url-docker-compose.yml up -d | |
- name: Cypress run | |
uses: cypress-io/github-action@v2 | |
with: | |
wait-on: http://localhost:8080/pyroscope | |
start: make server | |
config-file: cypress/base-url/cypress.json | |
env: | |
# keep the server quiet | |
PYROSCOPE_BASE_URL: 'http://localhost:8080/pyroscope' | |
PYROSCOPE_LOG_LEVEL: error | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
# Test auth when baseUrl is set | |
# We run the same tests from auth | |
# But with a different CYPRESS_BASE_URL | |
cypress-tests-base-url-auth: | |
runs-on: ubuntu-latest | |
env: | |
ENABLED_SPIES: none | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.19.0' | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 'lts/gallium' | |
- name: Cache go mod directories | |
uses: actions/cache@v2 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- uses: actions/cache@v2 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn | |
- run: yarn install --frozen-lockfile | |
- run: make -j e2e-build | |
- name: run nginx with /pyroscope | |
run: docker-compose -f cypress/base-url/base-url-docker-compose.yml up -d | |
- name: Cypress run | |
uses: cypress-io/github-action@v2 | |
with: | |
wait-on: http://localhost:8080/pyroscope | |
start: | | |
node ./scripts/oauth-mock/oauth-mock.js | |
make server SERVERPARAMS=--config=scripts/oauth-mock/pyroscope-config-base-url.yml | |
config-file: cypress/integration/auth/cypress.json | |
env: | |
PYROSCOPE_BASE_URL: 'http://localhost:8080/pyroscope' | |
PYROSCOPE_LOG_LEVEL: error | |
CYPRESS_BASE_URL: 'http://localhost:8080/pyroscope' | |
- uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots |