Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
name: Android
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/cache@v3
id: yarn-cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
name: Lint Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/cache@v3
id: yarn-cache
with:
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Tests
on:
pull_request:
branches:
- main
jobs:
jest:
name: Jest
permissions:
checks: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
id: yarn-cache
with:
path: "./.yarn/cache"
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Install Dependencies
run: yarn install --check-cache
- uses: ArtiomTr/jest-coverage-report-action@v2
with:
skip-step: install
test-script: yarn run jest --ci --json --coverage --testLocationInResults --outputFile=report.json
- uses: codecov/codecov-action@v3
with:
# token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./report.json
fail_ci_if_error: true

cypress:
runs-on: ubuntu-latest
name: Cypress
steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
id: yarn-cache
with:
path: "./.yarn/cache"
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-

- name: Cypress run
uses: cypress-io/github-action@v2
with:
install-command: yarn install --check-cache
command: yarn run test:e2e --headless
env:
# pass the Dashboard record key as an environment variable
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

.yarn/

tests/e2e/videos/

# Logs
logs
*.log
Expand Down
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = {
preset: '@vue/cli-plugin-unit-jest/presets/typescript-and-babel',
transformIgnorePatterns: ['/node_modules/(?!@ionic/vue|@ionic/vue-router|@ionic/core|@stencil/core|ionicons)'],
collectCoverage: true,
coverageReporters: ['json', 'lcov'],
// transform: {
// '^.+\.js$': 'babel-jest',
// '.\.(vue)$': 'vue-jest'
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/example.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import HomePage from '@/views/HomePage.vue';
import Tab1Page from '@/views/Tab1Page.vue';
import { mount } from '@vue/test-utils';

describe('FolderPage.vue', () => {
Expand All @@ -8,7 +8,7 @@ describe('FolderPage.vue', () => {
id: 'Outbox',
},
};
const wrapper = mount(HomePage, {
const wrapper = mount(Tab1Page, {
global: {
mocks: {
$route: mockRoute,
Expand Down