This repository has been archived by the owner on Jul 18, 2022. It is now read-only.
90 lines (73 loc) · 2.36 KB
/
test.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Test
on:
push:
branches:
- master
pull_request:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10'] # for 3.11.alpha testing you can add '3.11-dev'
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: |
curl -sSL "https://install.python-poetry.org" | python
# Adding `poetry` to `$PATH`:
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Install dependencies
run: |
poetry env use "${{ matrix.python-version }}"
poetry install
- name: Run checks
run: make test
# Upload coverage to codecov: https://codecov.io/
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
- name: Install node
if: ${{ matrix.python-version == '3.10' }}
uses: bahmutov/npm-install@v1
with:
working-directory: svelte
- name: Check TypeScript types
if: ${{ matrix.python-version == '3.10' }}
run: npx svelte-check
- name: Build Svelte
if: ${{ matrix.python-version == '3.10' }}
working-directory: svelte
run: npm run build
- name: Configure git
if: ${{ matrix.python-version == '3.10' }}
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Commit codestyle
if: ${{ matrix.python-version == '3.10' }}
continue-on-error: true
run: |
git commit -am "Apply codestyle :pencil2: [skip ci]" || true
- name: Update poetry
if: ${{ matrix.python-version == '3.10' }}
continue-on-error: true
run: |
poetry update
git commit -am "Update poetry.lock :chart_with_upwards_trend: [skip ci]" || true
- name: Push changes
if: ${{ matrix.python-version == '3.10' }}
continue-on-error: true
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.head_ref || github.ref_name }}