fix: remove temporary container Cypress run (#55102)

This commit is contained in:
Sem Bauke
2024-06-06 16:02:53 +02:00
committed by GitHub
parent 3209fc2024
commit ae757b446f

View File

@@ -103,59 +103,3 @@ jobs:
docker build \
-t fcc-new-api \
-f docker/new-api/Dockerfile .
cypress-run:
name: Test
runs-on: ubuntu-22.04
needs: [build-client, build-api]
strategy:
fail-fast: false
matrix:
# To avoid wasting resources we're only using chrome for now.
browsers: [chrome]
node-version: [20.x]
steps:
- name: Set Action Environment Variables
run: |
echo "CYPRESS_RECORD_KEY=${{ secrets.CYPRESS_RECORD_KEY }}" >> $GITHUB_ENV
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
- name: Checkout Source Files
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
# Cypress calls some pnpm scripts, so we need to install pnpm.
- name: Setup pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d #v3.0.0
with:
version: 9
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: pnpm install
- name: Load Images
run: |
docker load < client-artifact/client-artifact.tar
docker load < api-artifact/api-artifact.tar
- name: Set freeCodeCamp Environment Variables (needed by api)
run: cp sample.env .env
- name: Cypress run
uses: cypress-io/github-action@v6
with:
record: ${{ env.CYPRESS_RECORD_KEY != 0 }}
start: docker compose up -d
wait-on: http://localhost:8000, http://localhost:3000
wait-on-timeout: 1200
config: baseUrl=http://localhost:8000
browser: ${{ matrix.browsers }}
# Only run one test to keep the run time down.
spec: 'cypress/e2e/default/learn/challenges/failed-updates.ts'