Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
418c3a46
Unverified
Commit
418c3a46
authored
2 years ago
by
Nick Schonning
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Move Jest tests to filtered GitHub Action (#23623)
parent
fb8503e8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.circleci/config.yml
+0
-8
0 additions, 8 deletions
.circleci/config.yml
.github/workflows/test-js.yml
+41
-0
41 additions, 0 deletions
.github/workflows/test-js.yml
jest.config.js
+11
-18
11 additions, 18 deletions
jest.config.js
with
52 additions
and
26 deletions
.circleci/config.yml
+
0
−
8
View file @
418c3a46
...
...
@@ -217,11 +217,3 @@ workflows:
-
test-two-step-migrations
:
requires
:
-
build
-
node/run
:
cache-version
:
v1
name
:
test-webui
pkg-manager
:
yarn
requires
:
-
build
version
:
'
16.19'
yarn-run
:
test:jest
This diff is collapsed.
Click to expand it.
.github/workflows/test-js.yml
0 → 100644
+
41
−
0
View file @
418c3a46
name
:
JavaScript Testing
on
:
push
:
branches-ignore
:
-
'
dependabot/**'
paths
:
-
'
package.json'
-
'
yarn.lock'
-
'
.nvmrc'
-
'
**/*.js'
-
'
**/*.snap'
-
'
.github/workflows/test-js.yml'
pull_request
:
paths
:
-
'
package.json'
-
'
yarn.lock'
-
'
.nvmrc'
-
'
**/*.js'
-
'
**/*.snap'
-
'
.github/workflows/test-js.yml'
jobs
:
test
:
runs-on
:
ubuntu-latest
steps
:
-
name
:
Clone repository
uses
:
actions/checkout@v3
-
name
:
Set up Node.js
uses
:
actions/setup-node@v3
with
:
cache
:
yarn
node-version-file
:
'
.nvmrc'
-
name
:
Install all yarn packages
run
:
yarn --frozen-lockfile
-
name
:
Jest testing
run
:
yarn test:jest --reporters github-actions summary
This diff is collapsed.
Click to expand it.
jest.config.js
+
11
−
18
View file @
418c3a46
module
.
exports
=
{
'
testEnvironment
'
:
'
jsdom
'
,
'
projects
'
:
[
'
<rootDir>/app/javascript/mastodon
'
,
],
'
testPathIgnorePatterns
'
:
[
/** @type {import('jest').Config} */
const
config
=
{
testEnvironment
:
'
jsdom
'
,
testPathIgnorePatterns
:
[
'
<rootDir>/node_modules/
'
,
'
<rootDir>/vendor/
'
,
'
<rootDir>/config/
'
,
...
...
@@ -11,22 +9,17 @@ module.exports = {
'
<rootDir>/public/
'
,
'
<rootDir>/tmp/
'
,
],
'
setupFiles
'
:
[
'
raf/polyfill
'
,
],
'
setupFilesAfterEnv
'
:
[
'
<rootDir>/app/javascript/mastodon/test_setup.js
'
,
],
'
collectCoverageFrom
'
:
[
setupFiles
:
[
'
raf/polyfill
'
],
setupFilesAfterEnv
:
[
'
<rootDir>/app/javascript/mastodon/test_setup.js
'
],
collectCoverageFrom
:
[
'
app/javascript/mastodon/**/*.js
'
,
'
!app/javascript/mastodon/features/emoji/emoji_compressed.js
'
,
'
!app/javascript/mastodon/locales/locale-data/*.js
'
,
'
!app/javascript/mastodon/service_worker/entry.js
'
,
'
!app/javascript/mastodon/test_setup.js
'
,
],
'
coverageDirectory
'
:
'
<rootDir>/coverage
'
,
'
moduleDirectories
'
:
[
'
<rootDir>/node_modules
'
,
'
<rootDir>/app/javascript
'
,
],
coverageDirectory
:
'
<rootDir>/coverage
'
,
moduleDirectories
:
[
'
<rootDir>/node_modules
'
,
'
<rootDir>/app/javascript
'
],
};
module
.
exports
=
config
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment