Skip to content

Commit

Permalink
test: Replace KarmaJS with wdio qunit
Browse files Browse the repository at this point in the history
  • Loading branch information
mauriciolauffer committed Dec 5, 2023
1 parent fcfb47e commit f751866
Show file tree
Hide file tree
Showing 36 changed files with 7,838 additions and 10,550 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: mauriciolauffer
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
allow:
- dependency-type: "production"
4 changes: 1 addition & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ on:
push:
branches: [ master ]
pull_request:
schedule:
- cron: '10 5 * * 1'

permissions: read-all

Expand All @@ -36,7 +34,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: NPM Package Publish

on:
release:
types: [created]

permissions: read-all

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
cache: npm
- run: npm i -g @ui5/cli --ignore-scripts
- run: npm ci --ignore-scripts
- run: npm run build
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_SECRET }}
29 changes: 0 additions & 29 deletions .github/workflows/release-build.yml

This file was deleted.

23 changes: 8 additions & 15 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
name: release
on:
push:
branches: [master, main]
branches: [master]

permissions: read-all

jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.GH_PAT }}
release-type: node
package-name: openui5-validator
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: npm
if: ${{ steps.release.outputs.release_created }}
- run: npm ci --ignore-scripts
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
if: ${{ steps.release.outputs.release_created }}
9 changes: 5 additions & 4 deletions .github/workflows/scorecards-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
# Only the default branch is supported.
branch_protection_rule:
schedule:
- cron: '10 5 * * 1'
- cron: '30 5 * * 1'
push:
branches: [ master ]

Expand All @@ -17,15 +17,16 @@ jobs:
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
id-token: write

steps:
- name: "Checkout code"
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@c1aec4ac820532bab364f02a81873c555a0ba3a1 # v1.0.4
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
Expand All @@ -40,6 +41,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@v1
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
19 changes: 8 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,17 @@ jobs:
permissions:
security-events: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
cache: npm
- run: |
mkdir target
npm i @ui5/cli --ignore-scripts
npm ci --ignore-scripts
npm run build
npm run lint:ci
- uses: github/codeql-action/upload-sarif@v1
- run: npm i -g @ui5/cli concurrently --ignore-scripts
- run: npm ci --ignore-scripts
- run: npm run build
- run: npm run lint:ci
- run: concurrently --kill-others --success last "npm:start:dist" "npm:test:ci"
- uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: target/eslint.sarif
- run: npm run test:ci
134 changes: 134 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,137 @@ cp.project.properties.json
.project
.externalToolBuilders
tmp/
reports/

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

target/
*.sarif
4 changes: 2 additions & 2 deletions demo/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
<div id="content" data-sap-ui-component data-async="true" data-id="mlauffer.demo"
data-name="mlauffer.demo.openui5.validator"></div>
<script id="sap-ui-bootstrap" async defer
src="https://openui5.hana.ondemand.com/1.100.0/resources/sap-ui-core.js"
src="https://openui5.hana.ondemand.com/1.120.0/resources/sap-ui-core.js"
data-sap-ui-theme="sap_horizon"
data-sap-ui-compatVersion="edge" data-sap-ui-async="true"
data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"
data-sap-ui-language="en"
data-sap-ui-theme="sap_fiori_3"
data-sap-ui-resourceroots='{
"mlauffer.demo.openui5.validator": "./",
"openui5.validator": "../../dist/resources/openui5/validator"}'></script>
Expand Down
2 changes: 1 addition & 1 deletion dist/resources/openui5/validator/.library
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<library xmlns="http://www.sap.com/sap.ui.library.xsd">
<name>openui5.validator</name>
<vendor>Mauricio Lauffer</vendor>
<version>0.1.18</version>
<version>0.1.19</version>
<documentation>An OpenUI5 library to validate fields</documentation>
<dependencies>
<dependency>
Expand Down
Loading

0 comments on commit f751866

Please sign in to comment.