From 162ed1727bf6b826f1b1d5374e4035b2f989c213 Mon Sep 17 00:00:00 2001 From: michael-siek Date: Mon, 22 Jan 2024 20:20:37 -0500 Subject: [PATCH 1/9] ci: convert ci to use GHA --- .github/workflows/tests.yml | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..b93a1f9e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,55 @@ +name: Tests + +on: + pull_request: + push: + branches: + - master + - develop + - release-* + +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3 + - uses: actions/setup-node@v4 + with: + node-version: 20 + # HACK: Force a TTY to enable browser-driver-manager to manipulate stdout. + - shell: 'script -q -e -c "bash {0}"' + run: npx browser-driver-manager install chromedriver --verbose + working-directory: packages/puppeteer + - run: gem install bundler + - run: rake bootstrap + # unit test - API + - run: rake test_unit\[axe-core-api\] + # unit test - webdrivers + - run: rake test_unit\[axe-core-selenium\] + - run: rake test_unit\[axe-core-watir\] + - run: rake test_unit\[axe-core-capybara\] + # unit test - framework integrations + - run: rake test_unit\[axe-core-cucumber\] + - run: rake test_unit\[axe-core-rspec\] + # e2e test - rspec -> capybara + - run: | + cd packages/axe-core-rspec && cd e2e/capybara + bundle install && bundle exec rspec + # e2e test - cucumber -> capybara + - run: | + cd packages/axe-core-cucumber && cd e2e/capybara + bundle install && bundle exec cucumber + # e2e test - cucumber -> watir + - run: | + cd packages/axe-core-cucumber && cd e2e/watir + bundle install && bundle exec cucumber + # e2e test - selenium, axe 4.3.x + - run: | + npm i + cd node_modules/axe-test-fixtures/fixtures && python3 -m http.server & + sleep 1 # Just wait a bit for the http server to startup + cd packages/axe-core-api/e2e/selenium + bundle install && bundle exec rspec From ff957d19e975704ea34b8f886ba8578fd64f57f1 Mon Sep 17 00:00:00 2001 From: michael-siek Date: Mon, 22 Jan 2024 20:21:37 -0500 Subject: [PATCH 2/9] failed copy pasta --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b93a1f9e..d00833f5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,6 @@ jobs: # HACK: Force a TTY to enable browser-driver-manager to manipulate stdout. - shell: 'script -q -e -c "bash {0}"' run: npx browser-driver-manager install chromedriver --verbose - working-directory: packages/puppeteer - run: gem install bundler - run: rake bootstrap # unit test - API From fbca17a42fd3a54537e9c583e1580168e4dd8466 Mon Sep 17 00:00:00 2001 From: michael-siek Date: Mon, 22 Jan 2024 20:25:12 -0500 Subject: [PATCH 3/9] print_license --- .github/scripts/print_license.sh | 40 ++++++++++++++++++++++++++++++++ .github/workflows/tests.yml | 15 +++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 .github/scripts/print_license.sh diff --git a/.github/scripts/print_license.sh b/.github/scripts/print_license.sh new file mode 100644 index 00000000..19e52282 --- /dev/null +++ b/.github/scripts/print_license.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +for dir in packages/*; do + cd "$dir" + + echo "" + echo "" + echo "" + echo "" + echo "Printing dependencies for $dir" + + bundle exec ruby > licenses < Date: Mon, 22 Jan 2024 20:26:46 -0500 Subject: [PATCH 4/9] use ruby 3.3 --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 117faa38..78e0c177 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7.5 + ruby-version: 3.3 - uses: actions/setup-node@v4 with: node-version: 20 @@ -58,7 +58,7 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 2.7.5 + ruby-version: 3.3 - uses: actions/setup-node@v4 with: node-version: 20 From af79e9413453e5f01093f0b27b1df653bf3b73ee Mon Sep 17 00:00:00 2001 From: michael-siek Date: Mon, 22 Jan 2024 20:34:14 -0500 Subject: [PATCH 5/9] fix path --- .github/workflows/tests.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 78e0c177..5ac1534d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,14 +15,13 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.3 + ruby-version: 2.7.5 - uses: actions/setup-node@v4 with: node-version: 20 # HACK: Force a TTY to enable browser-driver-manager to manipulate stdout. - shell: 'script -q -e -c "bash {0}"' run: npx browser-driver-manager install chromedriver --verbose - - run: gem install bundler - run: rake bootstrap # unit test - API - run: rake test_unit\[axe-core-api\] @@ -58,10 +57,9 @@ jobs: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: 3.3 + ruby-version: 2.7.5 - uses: actions/setup-node@v4 with: node-version: 20 - - run: gem install bundler - run: rake bootstrap - - run: bash scripts/print_license.sh + - run: bash .github/scripts/print_license.sh From 486cd96411af7b5a499022994206e03daa3c7082 Mon Sep 17 00:00:00 2001 From: michael-siek Date: Mon, 22 Jan 2024 20:37:02 -0500 Subject: [PATCH 6/9] install ff --- .github/workflows/tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5ac1534d..fa7a7f3e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,6 +13,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: browser-actions/setup-firefox@v1 + - uses: browser-actions/setup-geckodriver@latest + with: + token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@v1 with: ruby-version: 2.7.5 From 739ed295a9673722738b3c6dd1ae5e8c69716345 Mon Sep 17 00:00:00 2001 From: michael-siek Date: Mon, 22 Jan 2024 20:38:07 -0500 Subject: [PATCH 7/9] fix yml --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fa7a7f3e..93dbbb22 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,8 +15,8 @@ jobs: - uses: actions/checkout@v4 - uses: browser-actions/setup-firefox@v1 - uses: browser-actions/setup-geckodriver@latest - with: - token: ${{ secrets.GITHUB_TOKEN }} + with: + token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@v1 with: ruby-version: 2.7.5 From 5ad2e6947d94ad8984e00d7024e93977fef0ab69 Mon Sep 17 00:00:00 2001 From: michael-siek Date: Mon, 5 Feb 2024 19:07:49 -0500 Subject: [PATCH 8/9] selenium --- .github/workflows/tests.yml | 57 ++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 93dbbb22..c0fcbe9a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,7 +9,19 @@ on: - release-* jobs: - tests: + license-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.5 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: rake bootstrap + - run: bash .github/scripts/print_license.sh + api: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -20,50 +32,37 @@ jobs: - uses: ruby/setup-ruby@v1 with: ruby-version: 2.7.5 + bundler-cache: true - uses: actions/setup-node@v4 with: node-version: 20 + cache: 'npm' # HACK: Force a TTY to enable browser-driver-manager to manipulate stdout. - shell: 'script -q -e -c "bash {0}"' run: npx browser-driver-manager install chromedriver --verbose - run: rake bootstrap # unit test - API - run: rake test_unit\[axe-core-api\] - # unit test - webdrivers - - run: rake test_unit\[axe-core-selenium\] - - run: rake test_unit\[axe-core-watir\] - - run: rake test_unit\[axe-core-capybara\] - # unit test - framework integrations - - run: rake test_unit\[axe-core-cucumber\] - - run: rake test_unit\[axe-core-rspec\] - # e2e test - rspec -> capybara - - run: | - cd packages/axe-core-rspec && cd e2e/capybara - bundle install && bundle exec rspec - # e2e test - cucumber -> capybara - - run: | - cd packages/axe-core-cucumber && cd e2e/capybara - bundle install && bundle exec cucumber - # e2e test - cucumber -> watir - - run: | - cd packages/axe-core-cucumber && cd e2e/watir - bundle install && bundle exec cucumber - # e2e test - selenium, axe 4.3.x - - run: | - npm i - cd node_modules/axe-test-fixtures/fixtures && python3 -m http.server & - sleep 1 # Just wait a bit for the http server to startup - cd packages/axe-core-api/e2e/selenium - bundle install && bundle exec rspec - license-check: + + selenium: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: browser-actions/setup-firefox@v1 + - uses: browser-actions/setup-geckodriver@latest + with: + token: ${{ secrets.GITHUB_TOKEN }} - uses: ruby/setup-ruby@v1 with: ruby-version: 2.7.5 + bundler-cache: true - uses: actions/setup-node@v4 with: node-version: 20 + cache: 'npm' + # HACK: Force a TTY to enable browser-driver-manager to manipulate stdout. + - shell: 'script -q -e -c "bash {0}"' + run: npx browser-driver-manager install chromedriver --verbose - run: rake bootstrap - - run: bash .github/scripts/print_license.sh + # unit test - API + - run: rake test_unit\[axe-core-selenium\] From f9146ec78a90d8c660483d85db74db0a73e0d90d Mon Sep 17 00:00:00 2001 From: michael-siek Date: Mon, 5 Feb 2024 19:09:21 -0500 Subject: [PATCH 9/9] cache issue --- .github/workflows/tests.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c0fcbe9a..ffa56579 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20 - cache: 'npm' # HACK: Force a TTY to enable browser-driver-manager to manipulate stdout. - shell: 'script -q -e -c "bash {0}"' run: npx browser-driver-manager install chromedriver --verbose @@ -59,7 +58,6 @@ jobs: - uses: actions/setup-node@v4 with: node-version: 20 - cache: 'npm' # HACK: Force a TTY to enable browser-driver-manager to manipulate stdout. - shell: 'script -q -e -c "bash {0}"' run: npx browser-driver-manager install chromedriver --verbose