generated from kevinlin1/just-the-class
-
Notifications
You must be signed in to change notification settings - Fork 7
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 #16 from berkeley-eecs/github-actions
Update GitHub Actions workflows
- Loading branch information
Showing
7 changed files
with
55 additions
and
16 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: Run rspec tests | ||
name: Run all page tests | ||
|
||
on: [pull_request] | ||
on: [pull_request, push] | ||
|
||
jobs: | ||
build: | ||
|
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,2 @@ | ||
AllCops: | ||
NewCops: enable |
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
describe "course website", type: :feature, js: true do | ||
describe 'course website', type: :feature, js: true do | ||
before :all do | ||
visit('/sitemap.xml') | ||
sitemap_links = page.html.scan(/<loc>.+<\/loc>/) | ||
sitemap_links = page.html.scan(%r{<loc>.+</loc>}) | ||
@links = [] | ||
sitemap_links.each do |link| | ||
# TODO don't hardcode base url | ||
# TODO: don't hardcode base url | ||
first_removed = link.sub('<loc>https://phrdang.github.io/berkeley-class-site', '') | ||
last_removed = first_removed.sub('</loc>', '') | ||
@links.push(last_removed) | ||
end | ||
end | ||
|
||
# TODO run each page's axe check separately so it doesn't exit on first failure | ||
it "is accessible" do | ||
# TODO: run each page's axe check separately so it doesn't exit on first failure | ||
it 'is accessible' do | ||
@links.each do |link| | ||
visit(link) | ||
expect(page).to be_axe_clean.according_to :wcag2a, "path: #{link} not accessible" | ||
end | ||
end | ||
end | ||
end |
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