Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vanilla snapshot test to match with package.json and replace deprecated set-output #676

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

21 changes: 12 additions & 9 deletions .github/workflows/cypress-workflow-vanilla-snapshot-based.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:
branches:
- main
- dev-*
env:
VERSION: '2.0.0'
jobs:
tests:
name: Run Cypress E2E tests
Expand All @@ -34,26 +32,31 @@ jobs:
# working-directory: monetery-test
# run: |
# echo "VERSION=$(yarn --silent pkg-version)" >> $GITHUB_ENV
- name: Get package version
working-directory: monetery-test
run: |
echo "VERSION=$(yarn --silent pkg-version)" >> $GITHUB_ENV
- name: Get and run OpenSearch
run: |
wget https://artifacts.opensearch.org/snapshots/core/opensearch/${{ env.VERSION }}-SNAPSHOT/opensearch-min-${{ env.VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz
tar -xzf opensearch-min-${{ env.VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz
cd opensearch-${{ env.VERSION }}-SNAPSHOT/
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/${{ env.VERSION }}/latest/linux/x64/tar/builds/opensearch/dist/opensearch-min-${{ env.VERSION }}-linux-x64.tar.gz
tar -xzf opensearch-min-${{ env.VERSION }}-linux-x64.tar.gz
cd opensearch-${{ env.VERSION }}/
bin/opensearch &
timeout 300 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9200)" != "200" ]]; do sleep 5; done'
- name: Get OpenSearch-Dashboards
run: |
wget https://artifacts.opensearch.org/snapshots/core/opensearch-dashboards/${{ env.VERSION }}-SNAPSHOT/opensearch-dashboards-min-${{ env.VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz
tar -xzf opensearch-dashboards-min-${{ env.VERSION }}-SNAPSHOT-linux-x64-latest.tar.gz
wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/builds/opensearch-dashboards/dist/opensearch-dashboards-min-${{ env.VERSION }}-linux-x64.tar.gz
tar -xzf opensearch-dashboards-min-${{ env.VERSION }}-linux-x64.tar.gz
- name: Run OpenSearch-Dashboards server
run: |
cd opensearch-dashboards-${{ env.VERSION }}-SNAPSHOT-linux-x64
cd opensearch-dashboards-${{ env.VERSION }}-linux-x64
bin/opensearch-dashboards serve &
timeout 300 bash -c 'while [[ "$(curl -s localhost:5601/api/status | jq -r '.status.overall.state')" != "green" ]]; do sleep 5; done'
- name: Get Cypress version
id: cypress_version
run: |
echo "::set-output name=cypress_version::$(cat ./monetery-test/package.json | jq '.devDependencies.cypress' | tr -d '"')"
cypress_version_temp=$(cat ./monetery-test/package.json | jq -r '.devDependencies.cypress')
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
Expand Down
119 changes: 0 additions & 119 deletions .github/workflows/cypress-workflow-vanilla-source-based.yml.disabled

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/release-e2e-workflow-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ jobs:
- name: Get node and yarn versions
id: versions
run: |
echo "::set-output name=node_version::$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}/package.json').engines.node).match(/[.0-9]+/)[0]")"
node_version_temp=$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}-linux-x64/package.json').engines.node).match(/[.0-9]+/)[0]")
echo "node_version=$node_version_temp" >> $GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v1
with:
Expand All @@ -95,7 +96,8 @@ jobs:
- name: Get Cypress version
id: cypress_version
run: |
echo "::set-output name=cypress_version::$(cat ./cypress-test/package.json | jq '.devDependencies.cypress' | tr -d '"')"
cypress_version_temp=$(cat ./monetery-test/package.json | jq -r '.devDependencies.cypress')
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release-signoff-chrome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
- name: Get node and yarn versions
id: versions
run: |
echo "::set-output name=node_version::$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}/package.json').engines.node).match(/[.0-9]+/)[0]")"
node_version_temp=$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}-linux-x64/package.json').engines.node).match(/[.0-9]+/)[0]")
echo "node_version=$node_version_temp" >> $GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v1
with:
Expand All @@ -49,7 +50,8 @@ jobs:
- name: Get Cypress version
id: cypress_version
run: |
echo "::set-output name=cypress_version::$(cat ./functional-test/package.json | jq '.devDependencies.cypress' | tr -d '"')"
cypress_version_temp=$(cat ./monetery-test/package.json | jq -r '.devDependencies.cypress')
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release-signoff-chromium-ad-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
- name: Get node and yarn versions
id: versions
run: |
echo "::set-output name=node_version::$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}/package.json').engines.node).match(/[.0-9]+/)[0]")"
node_version_temp=$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}-linux-x64/package.json').engines.node).match(/[.0-9]+/)[0]")
echo "node_version=$node_version_temp" >> $GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v1
with:
Expand All @@ -49,7 +50,8 @@ jobs:
- name: Get Cypress version
id: cypress_version
run: |
echo "::set-output name=cypress_version::$(cat ./functional-test/package.json | jq '.devDependencies.cypress' | tr -d '"')"
cypress_version_temp=$(cat ./monetery-test/package.json | jq -r '.devDependencies.cypress')
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release-signoff-chromium-ism-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
- name: Get node and yarn versions
id: versions
run: |
echo "::set-output name=node_version::$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}/package.json').engines.node).match(/[.0-9]+/)[0]")"
node_version_temp=$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}-linux-x64/package.json').engines.node).match(/[.0-9]+/)[0]")
echo "node_version=$node_version_temp" >> $GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v1
with:
Expand All @@ -49,7 +50,8 @@ jobs:
- name: Get Cypress version
id: cypress_version
run: |
echo "::set-output name=cypress_version::$(cat ./functional-test/package.json | jq '.devDependencies.cypress' | tr -d '"')"
cypress_version_temp=$(cat ./monetery-test/package.json | jq -r '.devDependencies.cypress')
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
- name: Get node and yarn versions
id: versions
run: |
echo "::set-output name=node_version::$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}/package.json').engines.node).match(/[.0-9]+/)[0]")"
node_version_temp=$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}-linux-x64/package.json').engines.node).match(/[.0-9]+/)[0]")
echo "node_version=$node_version_temp" >> $GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v1
with:
Expand All @@ -49,7 +50,8 @@ jobs:
- name: Get Cypress version
id: cypress_version
run: |
echo "::set-output name=cypress_version::$(cat ./functional-test/package.json | jq '.devDependencies.cypress' | tr -d '"')"
cypress_version_temp=$(cat ./monetery-test/package.json | jq -r '.devDependencies.cypress')
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
- name: Get node and yarn versions
id: versions
run: |
echo "::set-output name=node_version::$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}/package.json').engines.node).match(/[.0-9]+/)[0]")"
node_version_temp=$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}-linux-x64/package.json').engines.node).match(/[.0-9]+/)[0]")
echo "node_version=$node_version_temp" >> $GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v1
with:
Expand All @@ -49,7 +50,8 @@ jobs:
- name: Get Cypress version
id: cypress_version
run: |
echo "::set-output name=cypress_version::$(cat ./functional-test/package.json | jq '.devDependencies.cypress' | tr -d '"')"
cypress_version_temp=$(cat ./monetery-test/package.json | jq -r '.devDependencies.cypress')
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ jobs:
- name: Get node and yarn versions
id: versions
run: |
echo "::set-output name=node_version::$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}/package.json').engines.node).match(/[.0-9]+/)[0]")"
node_version_temp=$(node -p "(require('./opensearch-dashboards-${{ env.VERSION }}-linux-x64/package.json').engines.node).match(/[.0-9]+/)[0]")
echo "node_version=$node_version_temp" >> $GITHUB_ENV
- name: Setup node
uses: actions/setup-node@v1
with:
Expand All @@ -49,7 +50,8 @@ jobs:
- name: Get Cypress version
id: cypress_version
run: |
echo "::set-output name=cypress_version::$(cat ./functional-test/package.json | jq '.devDependencies.cypress' | tr -d '"')"
cypress_version_temp=$(cat ./monetery-test/package.json | jq -r '.devDependencies.cypress')
echo "cypress_version=$cypress_version_temp" >> $GITHUB_ENV
- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
Expand Down
Loading