Merge branch 'dev' #1
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: Run Cypress | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build cypress | |
run: | | |
cd ./test/cypress | |
yarn | |
- name: run test | |
run: | | |
cd ./test/cypress | |
yarn cypress run --reporter mochawesome | |
- name: safe report as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mochawesome-report | |
path: test/cypress/mochawesome-report | |
upload: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: get report as artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: mochawesome-report | |
path: test/cypress/mochawesome-report | |
- uses: shallwefootball/s3-upload-action@master | |
with: | |
aws_key_id: ${{ secrets.AWS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}} | |
aws_bucket: ${{ secrets.AWS_BUCKET }} | |
source_dir: "test/cypress/mochawesome-report" | |
# update-readme: | |
# needs: build | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Checkout repo | |
# uses: actions/checkout@v3 | |
# - name: Update README | |
# run: | | |
# echo "Adding new content to README" >> README.md | |
# - name: Commit and push if changed | |
# run: | | |
# git config --global user.email "[email protected]" | |
# git config --global user.name "Nil Gallego" | |
# git add README.md | |
# # Check for changes | |
# git diff --exit-code --cached || ( | |
# # Only commit and push if there are changes | |
# git commit -m "Update README [skip ci]" | |
# git push | |
# ) |