Bump actions/checkout from 3 to 4 #1638
Workflow file for this run
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: End-to-end tests | |
on: [pull_request] | |
jobs: | |
cypress-e2e-headless: | |
name: Cypress e2e | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: ["16"] | |
browser: ["firefox", "chrome"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Frontend | |
run: | | |
npx --quiet pinst --disable | |
npm install --production | |
npm run build --production | |
- name: Set up branch | |
run: | | |
if [[ "${{github.base_ref}}" == "master" ]]; then | |
echo "VERSION=master" >> $GITHUB_ENV | |
else | |
echo "VERSION=develop" >> $GITHUB_ENV | |
fi | |
- name: Clone backend | |
uses: actions/checkout@v4 | |
with: | |
repository: 'CSCfi/metadata-submitter' | |
path: metadata-submitter | |
ref: 639efda700276584e3928edb08309f620e70917a | |
- name: Set up branch | |
run: | | |
mkdir -p metadata-submitter/metadata_backend/frontend | |
cp -r build/* metadata-submitter/metadata_backend/frontend/ | |
docker-compose -f metadata-submitter/docker-compose.yml --env-file metadata-submitter/.env.example up -d --build | |
sleep 30 | |
- uses: cypress-io/github-action@v4 | |
with: | |
browser: ${{ matrix.browser }} | |
env: port=5430 | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
retention-days: 5 | |
- uses: actions/upload-artifact@v3 | |
if: failure() | |
with: | |
name: cypress-videos | |
path: cypress/videos | |
retention-days: 5 |