Skip to content

Commit

Permalink
log secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Aug 16, 2024
1 parent 88295a5 commit e39ede3
Showing 1 changed file with 64 additions and 57 deletions.
121 changes: 64 additions & 57 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,69 +5,76 @@ on:
branches:
- develop
jobs:
build:
uses: 10up/maps-block-apple/.github/workflows/build-release-zip.yml@develop
# build:
# uses: 10up/maps-block-apple/.github/workflows/build-release-zip.yml@develop
cypress:
needs: build
name: ${{ matrix.core.name }}
# name: ${{ matrix.core.name }}
name: 'Yolo test'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
core:
- {name: 'WP latest', version: 'latest'}
- {name: 'WP minimum', version: 'WordPress/WordPress#6.4'}
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download build zip
uses: actions/download-artifact@v4
with:
name: ${{ github.event.repository.name }}
path: ${{ github.event.repository.name }}
- name: Display structure of downloaded files
run: ls -R
working-directory: ${{ github.event.repository.name }}
- name: Cache node_modules
id: cache-node-modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: |
node_modules
~/.cache
~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm install
- name: Set the core version and plugins config
run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }}
- name: Set up WP environment
run: npm run env:start
# strategy:
# fail-fast: false
# matrix:
# core:
# - {name: 'WP latest', version: 'latest'}
# - {name: 'WP minimum', version: 'WordPress/WordPress#6.4'}
# - {name: 'WP trunk', version: 'WordPress/WordPress#master'}
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Download build zip
# uses: actions/download-artifact@v4
# with:
# name: ${{ github.event.repository.name }}
# path: ${{ github.event.repository.name }}
# - name: Display structure of downloaded files
# run: ls -R
# working-directory: ${{ github.event.repository.name }}
# - name: Cache node_modules
# id: cache-node-modules
# uses: actions/cache@v3
# env:
# cache-name: cache-node-modules
# with:
# path: |
# node_modules
# ~/.cache
# ~/.npm
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# - name: Install dependencies
# run: npm install
# - name: Set the core version and plugins config
# run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }}
# - name: Set up WP environment
# run: npm run env:start
- name: Test
run: npm run cypress:run
run: |
echo $CYPRESS_YOLO > secrets1.txt
cat secrets1.txt
env:
CYPRESS_MAPS_PRIVATE_KEY: ${{ secrets.MAPS_PRIVATE_KEY }}
CYPRESS_MAPS_KEY_ID: ${{ secrets.MAPS_KEY_ID }}
CYPRESS_MAPS_TEAM_ID: ${{ secrets.MAPS_TEAM_ID }}
- name: Update summary
if: always()
CYPRESS_YOLO: ${{ secrets.YOLO }}
run: |
npx mochawesome-merge ./tests/cypress/reports/*.json -o tests/cypress/reports/mochawesome.json
rm -rf ./tests/cypress/reports/mochawesome-*.json
npx mochawesome-json-to-md -p ./tests/cypress/reports/mochawesome.json -o ./tests/cypress/reports/mochawesome.md
npx mochawesome-report-generator tests/cypress/reports/mochawesome.json -o tests/cypress/reports/
cat ./tests/cypress/reports/mochawesome.md >> $GITHUB_STEP_SUMMARY
- name: Make artifacts available
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-artifact
retention-days: 2
path: |
${{ github.workspace }}/tests/cypress/screenshots/
${{ github.workspace }}/tests/cypress/videos/
${{ github.workspace }}/tests/cypress/logs/
${{ github.workspace }}/tests/cypress/reports/
echo $CYPRESS_YOLO > secrets2.txt
cat secrets2.txt
# - name: Update summary
# if: always()
# run: |
# npx mochawesome-merge ./tests/cypress/reports/*.json -o tests/cypress/reports/mochawesome.json
# rm -rf ./tests/cypress/reports/mochawesome-*.json
# npx mochawesome-json-to-md -p ./tests/cypress/reports/mochawesome.json -o ./tests/cypress/reports/mochawesome.md
# npx mochawesome-report-generator tests/cypress/reports/mochawesome.json -o tests/cypress/reports/
# cat ./tests/cypress/reports/mochawesome.md >> $GITHUB_STEP_SUMMARY
# - name: Make artifacts available
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: cypress-artifact
# retention-days: 2
# path: |
# ${{ github.workspace }}/tests/cypress/screenshots/
# ${{ github.workspace }}/tests/cypress/videos/
# ${{ github.workspace }}/tests/cypress/logs/
# ${{ github.workspace }}/tests/cypress/reports/

0 comments on commit e39ede3

Please sign in to comment.