-
-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (43 loc) · 1.43 KB
/
dependabot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Dependabot tests
on:
pull_request
jobs:
read-current-anki-matrix:
# Reads current Anki set-up from anki-current.json
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout pytest-anki
uses: actions/checkout@v2
- id: set-matrix
run: |
content=$(cat ./pytest_anki/anki-current.json)
content="${content//'%'/'%25'}"
content="${content//$'\n'/'%0A'}"
content="${content//$'\r'/'%0D'}"
content="{ \"include\": [ ${content} ] }"
echo "::set-output name=matrix::$content"
test-newly-published-anki:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
needs: read-current-anki-matrix
strategy:
matrix: ${{ fromJSON(needs.read-current-anki-matrix.outputs.matrix) }}
steps:
- name: Checkout pytest-anki
uses: actions/checkout@v2
- name: Set up environment
uses: ./.github/actions/setup_system
with:
# We assume that these will remain constant across most Anki updates.
# However, sometimes this will break.
python: ${{ matrix.python }}
chrome: ${{ matrix.chrome }}
- name: Set up project
uses: ./.github/actions/setup_project
- name: Run tests for Anki
shell: bash
run: |
make test