mirror of
https://github.com/Choices-js/Choices.git
synced 2024-04-28 03:52:46 +02:00
a0fe05f926
* Housekeeping * Resolve placeholder bug + hide from choice list * Restructure test folder * Update cypress test to assert one placeholder * Fix breaking e2e test * Remove ability to pass placeholder via config for select boxes * Add further e2e tests covering placeholders * Add unit tests for _generatePlaceholderValue * Display placeholder choice for select one * Add further e2e test to assert on placeholder ordering * Add labels to exclude from draft releases * Add failure case to e2e test workflow * Resolve broken e2e test * Update puppeteer snapshot baseline
59 lines
1.8 KiB
YAML
59 lines
1.8 KiB
YAML
name: End-to-end tests
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'src/**'
|
|
- 'package-lock.json'
|
|
- '.browserslistrc'
|
|
- '.babelrc'
|
|
- 'webpack.config.*'
|
|
- 'public/test/**'
|
|
- 'cypress/**'
|
|
- '.github/workflows/cypress.yml'
|
|
|
|
jobs:
|
|
test-e2e:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 10
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
env:
|
|
HUSKY_SKIP_INSTALL: true
|
|
|
|
- name: run Cypress (with recording)
|
|
run: npx run-p --race start cypress:ci
|
|
env:
|
|
CI: true
|
|
TERM: xterm-256color
|
|
NODE_ENV: production # prevent watching
|
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
DEBUG: commit-info,cypress:server:record
|
|
# https://docs.cypress.io/guides/guides/continuous-integration.html#Environment-variables
|
|
COMMIT_INFO_BRANCH: ${{ github.head_ref }}
|
|
COMMIT_INFO_AUTHOR: ${{ github.event.sender.login }}
|
|
COMMIT_INFO_SHA: ${{ github.event.after }}
|
|
|
|
# if we have ran out of free Cypress recordings, run Cypress with recording switched off
|
|
- name: run Cypress (without recording)
|
|
if: failure()
|
|
run: npx run-p --race start cypress:run
|
|
env:
|
|
CI: true
|
|
TERM: xterm-256color
|
|
NODE_ENV: production # prevent watching
|
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
DEBUG: commit-info,cypress:server:record
|
|
# https://docs.cypress.io/guides/guides/continuous-integration.html#Environment-variables
|
|
COMMIT_INFO_BRANCH: ${{ github.head_ref }}
|
|
COMMIT_INFO_AUTHOR: ${{ github.event.sender.login }}
|
|
COMMIT_INFO_SHA: ${{ github.event.after }}
|