Skip to content

Commit ac8cba4

Browse files
author
dmy.berezovskyi
committed
added new job
1 parent 82e9dea commit ac8cba4

File tree

2 files changed

+36
-14
lines changed

2 files changed

+36
-14
lines changed

.github/workflows/clear_cache.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Clear cache
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
actions: write
8+
9+
jobs:
10+
clear-cache:
11+
runs-on: macos-latest
12+
steps:
13+
- name: Clear cache
14+
uses: actions/github-script@v6
15+
with:
16+
script: |
17+
console.log("About to clear")
18+
const caches = await github.rest.actions.getActionsCacheList({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
})
22+
for (const cache of caches.data.actions_caches) {
23+
console.log(cache)
24+
github.rest.actions.deleteActionsCacheById({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
cache_id: cache.id,
28+
})
29+
}
30+
console.log("Clear completed")

.github/workflows/run_tests.yaml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,6 @@ jobs:
2424
with:
2525
python-version: "3.10"
2626

27-
# Install Poetry
28-
- name: Install Poetry
29-
run: |
30-
python -m pip install --upgrade pip
31-
pip install poetry
32-
33-
# Clear Poetry cache
34-
- name: Clear Poetry cache
35-
run: |
36-
poetry cache clear --all pypoetry
37-
poetry cache clear --all virtualenvs
38-
39-
# Install Chrome and WebDriver if not already installed
4027
- name: Install Chrome and WebDriver if not already installed
4128
run: |
4229
if ! command -v google-chrome &>/dev/null; then
@@ -46,6 +33,11 @@ jobs:
4633
echo "Chrome is already installed"
4734
fi
4835
36+
- name: Install Poetry
37+
run: |
38+
python -m pip install --upgrade pip
39+
pip install poetry
40+
4941
- name: Install dependencies with Poetry
5042
run: |
5143
poetry install
@@ -67,4 +59,4 @@ jobs:
6759
uses: actions/upload-artifact@v3
6860
with:
6961
name: screenshots
70-
path: reports/screenshots/*
62+
path: reports/screenshots/*

0 commit comments

Comments
 (0)