chore: Update npm dependencies for Twitch API integration #42
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: Execute tests and move to test-passed branch | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Start the application | |
run: pnpm run start & | |
env: | |
NODE_ENV: test | |
- name: Wait for the application to be ready | |
run: sleep 5 | |
- name: Run Cypress | |
run: pnpm run cypress:run | |
move-branch: | |
needs: run-tests | |
if: success() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Configure Git | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
- name: Create or move to test-passed branch | |
run: | | |
git fetch origin | |
git checkout -B test-passed | |
git push origin test-passed --force |