-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #363 from dequelabs/release-1695833797
chore: release v4.8.0
- Loading branch information
Showing
17 changed files
with
1,506 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.