Skip to content

Commit

Permalink
Add tests automation (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
arsenykruglikov authored Oct 31, 2023
1 parent 4c11996 commit 00e2adc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
name: 'Test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm ci
- name: Build spatial
run: npm run build
- name: Start test app and run tests
run: |
npm run test-app:start &
npm run cypress:run
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
save-exact=true
auto-install-peers = true
@salutejs:registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=${NPM_REGISTRY_TOKEN}
1 change: 1 addition & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from 'cypress';

export default defineConfig({
video: false,
e2e: {
baseUrl: 'http://localhost:1234',
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"docs:build": "typedoc src/index.ts",
"docs:serve": "http-server ./docs -c-1",
"test-app:start": "rm -rf dist-test-app .parcel-cache && parcel ./tests/pages/**/*.html --dist-dir dist-test-app --no-cache",
"test-app:build": "parcel build ./tests/pages/**/*.html --dist-dir dist-test-app --no-cache",
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"release": "git diff && auto shipit"
},
"browserslist": [
Expand Down

0 comments on commit 00e2adc

Please sign in to comment.