Skip to content

Commit

Permalink
[github] Run Vue app unit tests in workflow again
Browse files Browse the repository at this point in the history
  • Loading branch information
mayakokits authored and torotil committed Mar 13, 2023
1 parent 6edc0ab commit d056197
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,24 +56,26 @@ jobs:
- name: Run phpunit tests
run: UPAL_ROOT=$ROOT UPAL_WEB_URL=http://127.0.0.1 XDEBUG_MODE=coverage phpunit --bootstrap=$COMPOSER_HOME/vendor/torotil/upal/bootstrap.php --coverage-clover=coverage.xml .
- uses: codecov/codecov-action@v1

yarn:
env:
APP_DIRS: campaignion_email_to_target/datasets_app campaignion_email_to_target/messages_app campaignion_wizard/redirects_app
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: "Setup node"
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 10
node-version: '18.12.1'
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'
- name: Set env
run: |
echo "REPO=`pwd`" >> $GITHUB_ENV
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -85,7 +87,7 @@ jobs:
for d in ${{ env.APP_DIRS }}
do
cd $REPO/$d
yarn install
yarn install --frozen-lockfile
done
- name: yarn unit
run: |
Expand Down
4 changes: 2 additions & 2 deletions campaignion_email_to_target/datasets_app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"dev": "concurrently \"vite\" \"node api-server.js\"",
"build": "vite build",
"preview": "concurrently \"vite preview --port 4173\" \"node api-server.js\"",
"test:unit": "vitest --environment jsdom",
"test:e2e": "start-server-and-test preview http://localhost:4173/ 'PREVIEW_PORT=4173 nightwatch test/e2e/'",
"unit": "vitest run --environment jsdom",
"e2e": "start-server-and-test preview http://localhost:4173/ 'PREVIEW_PORT=4173 nightwatch test/e2e/'",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion campaignion_email_to_target/messages_app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dev": "vite",
"build": "vite build",
"preview": "vite preview --port 4173",
"test": "vitest --environment jsdom",
"unit": "vitest run --environment jsdom",
"lint": "eslint --ext .js,.vue src test/unit/specs"
},
"dependencies": {
Expand Down

0 comments on commit d056197

Please sign in to comment.