Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/accessibility-chec…
Browse files Browse the repository at this point in the history
…ker-extension/webpack-5.94.0
  • Loading branch information
ErickRenteria authored Sep 10, 2024
2 parents 7d14e6e + ca33111 commit 51d3653
Show file tree
Hide file tree
Showing 72 changed files with 6,437 additions and 12 deletions.
44 changes: 43 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,4 +222,46 @@ jobs:
BLUEMIX_USERID: apikey
BLUEMIX_PASS: ${{ secrets.BLUEMIX_PASS }}
CLOUD_PWD: ${{ secrets.CLOUD_PWD }}
TRAVIS_BRANCH: prod
TRAVIS_BRANCH: prod

java-accessibility-checker-deploy:
runs-on: ubuntu-22.04
permissions:
packages: write
strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
distribution: 'semeru' # See 'Supported distributions' for available options
java-version: '17'
server-id: central
server-username: ${{ secrets.MVN_GITHUB_USER }}
server-password: ${{ secrets.MVN_GITHUB_TOKEN }}
- uses: s4u/[email protected]
with:
servers: |
[{
"id": "central",
"username": "${{ secrets.MVN_GITHUB_USER }}",
"password": "${{ secrets.MVN_GITHUB_TOKEN }}"
}]
- name: Configure GPG Key
run: echo "$GPG_SIGNING_KEY" >private.key
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
- name: Import GPG Key
run: gpg --pinentry-mode=loopback --passphrase "$GPG_SIGNING_KEY_PASS" --import private.key
env:
GPG_SIGNING_KEY_PASS: ${{ secrets.GPG_SIGNING_KEY_PASS }}
- name: Set version
run: sed -i'.old' -e 's/\<version\>3\.0\.0\<\/version\>/\<version\>'"${GITHUB_REF:10}"'\<\/version\>/g' ./pom.xml
working-directory: java-accessibility-checker
- name: Publish package
run: mvn --batch-mode deploy -DskipTests -Dgpg.passphrase=$GPG_SIGNING_KEY_PASS
working-directory: java-accessibility-checker
env:
GPG_SIGNING_KEY_PASS: ${{ secrets.GPG_SIGNING_KEY_PASS }}
71 changes: 71 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,77 @@ jobs:
- run: npm run wdio
working-directory: accessibility-checker/test/webdriverio

###############################################################################
# Java test
####
java-accessibility-checker-selenium-test:
runs-on: ubuntu-22.04

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
distribution: 'semeru' # See 'Supported distributions' for available options
java-version: '17'
- name: Latest Chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: latest
install-chromedriver: true
id: setup-chrome
- run: npm install
working-directory: rule-server
- run: npm run build
working-directory: rule-server
- run: node main.js &
working-directory: rule-server/dist
- run: sleep 10
working-directory: rule-server/dist
- name: Test package
run: mvn --batch-mode test -Dtest="AccessibilityCheckerSeleniumTest"
working-directory: java-accessibility-checker
env:
chromedriverpath: ${{ steps.setup-chrome.outputs.chromedriver-path }}
chromebinpath: ${{ steps.setup-chrome.outputs.chrome-path }}

java-accessibility-checker-playwright-test:
runs-on: ubuntu-22.04

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
distribution: 'semeru' # See 'Supported distributions' for available options
java-version: '17'
- name: Latest Chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: latest
install-chromedriver: true
id: setup-chrome
- run: npm install
working-directory: rule-server
- run: npm run build
working-directory: rule-server
- run: node main.js &
working-directory: rule-server/dist
- run: sleep 10
working-directory: rule-server/dist
- name: Test package
run: mvn --batch-mode test -Dtest="AccessibilityCheckerPlaywrightTest"
working-directory: java-accessibility-checker
env:
chromedriverpath: ${{ steps.setup-chrome.outputs.chromedriver-path }}
chromebinpath: ${{ steps.setup-chrome.outputs.chrome-path }}

###############################################################################
# Karma Tests
####
Expand Down
2 changes: 1 addition & 1 deletion accessibility-checker-engine/karmaaction.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ module.exports = (config) => {
customLaunchers: {
ChromeCustom: {
base: 'ChromeHeadless',
flags: ['--disable-web-security', '--no-sandbox']
flags: ['--disable-gpu', '--disable-web-security', '--no-sandbox']
}
},
preprocessors: {
Expand Down
8 changes: 4 additions & 4 deletions cypress-accessibility-checker/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions java-accessibility-checker/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are Windows script files and should use crlf
*.bat text eol=crlf

# Binary files should be left untouched
*.jar binary

5 changes: 5 additions & 0 deletions java-accessibility-checker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.mvn
results
target
settings.xml
*.gpg
47 changes: 47 additions & 0 deletions java-accessibility-checker/README-DEV.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Deployments found at https://central.sonatype.com/publishing/deployments

## Example maven commands

Run all tests:
```
mvn test
```

Run specific test
```
mvn test -Dtest="TheSecondUnitTest#whenTestCase2_thenPrintTest2_1"
```

Deploy
```
mvn -s ./settings.xml clean deploy -Dgpg.passphrase=yourpassphrase
```

Deployments show up on https://central.sonatype.com/publishing/deployments and then they can be Dropped or Published. Once Published, they cannot be Dropped.

Generate javadoc for local review (files in target/site/apidocs/)
```
mvn javadoc:javadoc
```

## PGP Key Management

Generate PGP key:
```
gpg --gen-key
> Real name: IBM Accessibility
> Email address: [email protected]
gpg --armor --output public-key.gpg --export [email protected]
```
Go to https://keyserver.ubuntu.com/, Click `Submit Key`, and paste in public-key.gpg

Export private key:
```
gpg --export-secret-keys -a 7A58C8C58C35FF078630FA3615954E19FBC774C4
```

Verify Key:
```
gpg --list-signatures
```
Go to https://keyserver.ubuntu.com/pks/lookup?search=7A58C8C58C35FF078630FA3615954E19FBC774C4&fingerprint=on&op=index and replace `7A58C8C58C35FF078630FA3615954E19FBC774C4` with the key signature
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

# Binary files should be left untouched
*.jar binary

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format

[versions]
commons-math3 = "3.6.1"
guava = "33.1.0-jre"
junit = "4.13.2"

[libraries]
commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" }
guava = { module = "com.google.guava:guava", version.ref = "guava" }
junit = { module = "junit:junit", version.ref = "junit" }
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 51d3653

Please sign in to comment.