Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Task autotest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jiří Kalvoda
Task autotest
Commits
84e533a6
Commit
84e533a6
authored
1 year ago
by
Daniel Skýpala
Browse files
Options
Downloads
Patches
Plain Diff
Refresh: Add refresh
parent
4d191b31
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
task_autotest/refresh.py
+23
-0
23 additions, 0 deletions
task_autotest/refresh.py
with
23 additions
and
0 deletions
task_autotest/refresh.py
0 → 100644
+
23
−
0
View file @
84e533a6
from
copy
import
deepcopy
from
git
import
Repo
from
random
import
shuffle
import
os
import
task_autotest.config
as
config
from
task_autotest.util
import
path_to_str
from
task_autotest.test
import
test_task_commit
def
refresh
()
->
None
:
repo
=
Repo
(
config
.
REPO_DIR
)
repo
.
remotes
.
origin
.
pull
()
tasks
=
deepcopy
(
config
.
TASKS
)
shuffle
(
tasks
)
for
branch
,
task
in
tasks
:
repo
.
git
.
checkout
(
branch
)
commit_hash
=
repo
.
head
.
commit
.
hexsha
if
not
os
.
path
.
exists
(
os
.
path
.
join
(
config
.
DATA_DIR
,
path_to_str
(
task
),
commit_hash
)):
return
test_task_commit
(
task
,
commit_hash
)
return
None
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