Skip to content

Commit

Permalink
Merge pull request #363 from dequelabs/release-1695833797
Browse files Browse the repository at this point in the history
chore: release v4.8.0
  • Loading branch information
dequejenn authored Oct 2, 2023
2 parents 065f81d + 1e45f60 commit 48417ac
Show file tree
Hide file tree
Showing 17 changed files with 1,506 additions and 126 deletions.
77 changes: 1 addition & 76 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
browser-tools: circleci/browser-tools@1.2.4
browser-tools: circleci/browser-tools@1.4.3

defaults: &defaults
docker:
Expand All @@ -26,66 +26,6 @@ jobs:
- selenium/node_modules
- playwright/node_modules

check_licenses:
<<: *defaults
steps:
- checkout
- restore_cache:
key: npm-v1-deps-{{ checksum "package-lock.json" }}-{{ checksum "selenium/package-lock.json" }}-{{ checksum "playwright/package-lock.json" }}
- run: mvn compile license:add-third-party
- run:
name: Selenium Licenses
command: node .circleci/license-check.js selenium/target/generated-sources/license/THIRD-PARTY.txt
- run:
name: Playwright Licenses
command: node .circleci/license-check.js playwright/target/generated-sources/license/THIRD-PARTY.txt

selenium:
<<: *defaults
steps:
- checkout
- restore_cache:
key: npm-v1-deps-{{ checksum "package-lock.json" }}-{{ checksum "selenium/package-lock.json" }}-{{ checksum "playwright/package-lock.json" }}
- run: sudo apt update && sudo apt install python2
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run:
command: |
google-chrome --version
chromedriver --version
- run: mvn clean install -DskipTests
- run:
command: node selenium/src/test/resources/test-app.js
background: true
- run:
command: cd selenium/node_modules/axe-test-fixtures/fixtures && python2 -m SimpleHTTPServer 8001
background: true

- run: sleep 5 # sleep to allow the server some time to boot
# run only selenium tests in this job
- run: mvn test -pl selenium

playwright:
<<: *defaults
steps:
- checkout
- restore_cache:
key: npm-v1-deps-{{ checksum "package-lock.json" }}-{{ checksum "selenium/package-lock.json" }}-{{ checksum "playwright/package-lock.json" }}
- browser-tools/install-chrome
- browser-tools/install-chromedriver
- run:
command: |
google-chrome --version
chromedriver --version
- run: mvn clean install -DskipTests
# start the test fixture server
- run:
name: Start test fixture server
command: cd playwright && npm start
background: true
# run only playwright tests in this job
- run: mvn test -q -pl playwright

snapshot_release:
<<: *defaults
steps:
Expand Down Expand Up @@ -128,32 +68,17 @@ workflows:
build_and_test:
jobs:
- dependencies_npm
- check_licenses:
requires:
- dependencies_npm
- selenium:
requires:
- dependencies_npm
- playwright:
requires:
- dependencies_npm
- snapshot_release:
context: html-tools
requires:
- dependencies_npm
- selenium
- playwright
- check_licenses
filters:
branches:
only: develop
- release:
context: html-tools
requires:
- dependencies_npm
- selenium
- playwright
- check_licenses
filters:
branches:
only: master
Expand Down
46 changes: 46 additions & 0 deletions .github/scripts/prepare_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

# Fail on first error.
set -e

releaseLevel="$1"

oldVersion="$(node -pe 'require("./package.json").version')"
npx standard-version --release-as "$releaseLevel" --skip.commit=true --skip.changelog=true --skip.tag=true

cd selenium
npx standard-version --release-as "$releaseLevel" --skip.commit=true --skip.changelog=true --skip.tag=true
cd ..
newVersion="$(node -pe 'require("./package.json").version')"


# xmlstarlet is used to edit xml files
sudo apt-get install -y xmlstarlet

updateXML() {
xpath="$1"
newValue="$2"
file="$3"

# Update file inplace (--inplace) and preserve formatting (-P)
xmlstarlet edit -P --inplace --update "$xpath" --value "$newValue" "$file"
}

versionXpath=/_:project/_:version
parentVersionXpath=/_:project/_:parent/_:version
# Reads as: Select the "version" node of the "dependency" node that has a "groupId" node which matches "com.deque.html.axe-devtools"
dequeDepVersionXpath='/_:project/_:dependencies/_:dependency[_:groupId="com.deque.html.axe-core"]/_:version'
propertiesVersionXpath=/_:project/_:properties/_:version

updateXML "$versionXpath" "$newVersion" pom.xml

# Update version, the version of parent, and version of any ADT deps in our ADT packages
for package in utilities selenium playwright; do
updateXML "$versionXpath" "$newVersion" "$package"/pom.xml
updateXML "$parentVersionXpath" "$newVersion" "$package"/pom.xml
# If no dep is found no change will be made
updateXML "$dequeDepVersionXpath" "$newVersion" "$package"/pom.xml
done

npx conventional-changelog-cli -p angular -i CHANGELOG.md -s

26 changes: 26 additions & 0 deletions .github/workflows/auto-patch-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Automatically create patch release every 2 weeks
on:
workflow_dispatch:
jobs:
create_patch_release:
name: Create release
runs-on: ubuntu-latest
steps:
- name: Determine if we skip cancel checks
id: skip-checks
shell: bash
# Skip checks if we are not a scheduled run
run: echo value=$(test ${{ github.event_name }} != schedule && echo true || echo false) >> "$GITHUB_OUTPUT"


- name: Create release
uses: dequelabs/axe-api-team-public/.github/actions/auto-patch-release-v1@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
project_token: ${{ secrets.GH_PROJECT_TOKEN }}
skip_checks: ${{ steps.skip-checks.outputs.value }}
slack_webhook: ${{ secrets.SLACK_WEBHOOK }}
odd_release: 'true'
release-command: bash .github/scripts/prepare_release.sh
release-branch: master
default-branch: develop
112 changes: 112 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: Tests

on:
push:
branches:
- "**" # all branches
- "!master" # except master
- "!develop" # except develop

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache npm dependencies
uses: actions/cache@v3
id: npm-cache
with:
path: "**/node_modules"
key: npm-cache-v1-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-cache-v1-${{ runner.os }}-
- name: Cache Maven dependencies
uses: actions/cache@v3
id: maven-cache
with:
path: ~/.m2/repository
key: maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-cache-v1-${{ runner.os }}-
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: "8"
distribution: "temurin"
- name: Install Maven dependencies
# https://github.com/actions/cache#skipping-steps-based-on-cache-hit
if: steps.maven-cache.outputs.cache-hit != 'true'
run: mvn clean install -DskipTests
- name: Install NPM dependencies
# https://github.com/actions/cache#skipping-steps-based-on-cache-hit
if: steps.npm-cache.outputs.cache-hit != 'true'
run: |
npm install &&
npm --prefix=selenium install &&
npm --prefix=playwright install
license-check:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Maven compile licenses
run: mvn compile license:add-third-party
- name: Check Selenium licenses
run: node scripts/license-check.js selenium/target/generated-sources/license/THIRD-PARTY.txt
- name: Check Playwright licenses
run: node scripts/license-check.js playwright/target/generated-sources/license/THIRD-PARTY.txt

playwright-tests:
needs: [license-check, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
name: Restore npm cache
id: npm-cache
with:
path: "**/node_modules"
key: npm-cache-v1-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-cache-v1-${{ runner.os }}-
- uses: actions/cache@v3
name: Restore Maven cache
id: maven-cache
with:
path: ~/.m2/repository
key: maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-cache-v1-${{ runner.os }}-
- name: Start fixture server
run: npm --prefix=playwright start &
- name: Run Playwright tests
run: mvn test -q -pl playwright

selenium-tests:
needs: [license-check, build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/cache@v3
name: Restore npm cache
id: npm-cache
with:
path: "**/node_modules"
key: npm-cache-v1-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-cache-v1-${{ runner.os }}-
- uses: actions/cache@v3
name: Restore Maven cache
id: maven-cache
with:
path: ~/.m2/repository
key: maven-cache-v1-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-cache-v1-${{ runner.os }}-
- name: Start fixture server
run: python -m http.server 8001 &
working-directory: selenium/node_modules/axe-test-fixtures/fixtures
- name: Run Selenium tests
run: mvn test -q -pl selenium
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [4.8.0](https://github.com/dequelabs/axe-core-maven-html/compare/v4.7.0...v4.8.0) (2023-09-27)


### Features

* Update axe-core to v4.8.1 ([#349](https://github.com/dequelabs/axe-core-maven-html/issues/349)) ([bfb4928](https://github.com/dequelabs/axe-core-maven-html/commit/bfb4928a498cd56069b504ed8527e9d7f8311d39))


### Bug Fixes

* **playwright,selenium:** pin axe-core version to accept patch updates only ([#362](https://github.com/dequelabs/axe-core-maven-html/issues/362)) ([0b529fd](https://github.com/dequelabs/axe-core-maven-html/commit/0b529fd43772bffbb28a2317c0e959dc8407807c))
* Update axe-core to v4.8.2 ([#361](https://github.com/dequelabs/axe-core-maven-html/issues/361)) ([29df855](https://github.com/dequelabs/axe-core-maven-html/commit/29df855d0d25f7f08a3f8ac4672b3a2f7290bb7b))

## [4.7.0](https://github.com/dequelabs/axe-core-maven-html/compare/v4.5.1...v4.7.0) (2023-04-26)


Expand Down
Loading

0 comments on commit 48417ac

Please sign in to comment.