Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
15fae139
Unverified
Commit
15fae139
authored
3 years ago
by
Muhammad Soban Javed
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
feat: run a11y test using github actions (#27748)
parent
335a0f28
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/a11y-test.yml
+100
-0
100 additions, 0 deletions
.github/workflows/a11y-test.yml
pavelib/utils/process.py
+2
-2
2 additions, 2 deletions
pavelib/utils/process.py
with
102 additions
and
2 deletions
.github/workflows/a11y-test.yml
0 → 100644
+
100
−
0
View file @
15fae139
name
:
CI
on
:
workflow_dispatch
:
pull_request
:
branches
:
-
master
push
:
branches
:
-
master
jobs
:
run_tests
:
name
:
a11y
runs-on
:
${{ matrix.os }}
strategy
:
matrix
:
os
:
[
ubuntu-20.04
]
node-version
:
[
12
]
python-version
:
[
3.8
]
steps
:
-
name
:
Checkout repo
uses
:
actions/checkout@v2
-
name
:
Setup Gecko Driver
uses
:
browser-actions/setup-geckodriver@latest
-
name
:
Setup Node
uses
:
actions/setup-node@v2
with
:
node-version
:
${{ matrix.node-version }}
-
name
:
Install npm Dependencies
run
:
npm install -g rtlcss
-
name
:
Setup Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v2
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Get pip cache dir
id
:
pip-cache-dir
run
:
|
echo "::set-output name=dir::$(pip cache dir)"
-
name
:
Cache pip dependencies
id
:
cache-dependencies
uses
:
actions/cache@v2
with
:
path
:
${{ steps.pip-cache-dir.outputs.dir }}
key
:
${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
restore-keys
:
${{ runner.os }}-pip-
-
name
:
Install Required Packages
run
:
|
sudo apt-get update
sudo apt-get install -y libxmlsec1-dev memcached
-
name
:
Install Python dependencies
run
:
|
pip install -r requirements/pip.txt
pip install -r requirements/edx/development.txt
-
name
:
Initiate Services
env
:
DB_DATABASE
:
edxtest
DB_USER
:
root
DB_PASSWORD
:
root
run
:
|
sudo systemctl start mongod
sudo service memcached start
sudo /etc/init.d/mysql start
-
name
:
Reset mysql password
run
:
|
cat <<EOF | mysql -h 127.0.0.1 -u root --password=root
UPDATE mysql.user SET authentication_string = null WHERE user = 'root';
FLUSH PRIVILEGES;
EOF
-
name
:
Run Tests
env
:
TEST_SUITE
:
a11y
DB_DATABASE
:
edxtest
DB_USER
:
root
DB_PASSWORD
:
'
'
run
:
|
sudo service mysql restart
SELENIUM_BROWSER=chrome BOKCHOY_HEADLESS=true paver test_a11y
-
name
:
Save Job Artifacts
uses
:
actions/upload-artifact@v2
with
:
name
:
Build-Artifacts
path
:
|
reports/**/*
test_root/log/*.png
test_root/log/*.log
**/TEST-*.xml
This diff is collapsed.
Click to expand it.
pavelib/utils/process.py
+
2
−
2
View file @
15fae139
...
...
@@ -18,7 +18,7 @@ def kill_process(proc):
Kill the process `proc` created with `subprocess`.
"""
p1_group
=
psutil
.
Process
(
proc
.
pid
)
child_pids
=
p1_group
.
get_
children
(
recursive
=
True
)
# lint-amnesty, pylint: disable=no-member
child_pids
=
p1_group
.
children
(
recursive
=
True
)
for
child_pid
in
child_pids
:
os
.
kill
(
child_pid
.
pid
,
signal
.
SIGKILL
)
...
...
@@ -110,7 +110,7 @@ def run_background_process(cmd, out_log=None, err_log=None, cwd=None):
killed properly.
"""
p1_group
=
psutil
.
Process
(
proc
.
pid
)
child_pids
=
p1_group
.
get_
children
(
recursive
=
True
)
# lint-amnesty, pylint: disable=no-member
child_pids
=
p1_group
.
children
(
recursive
=
True
)
for
child_pid
in
child_pids
:
os
.
kill
(
child_pid
.
pid
,
signal
.
SIGINT
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment