-
-
Notifications
You must be signed in to change notification settings - Fork 12
69 lines (60 loc) · 1.54 KB
/
ci.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
name: Tests
on:
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
push:
branches:
- main
paths-ignore:
- 'docs/**'
- '*.md'
tags:
- '*'
permissions:
contents: write
jobs:
Testing:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.7, '3.10', '3.11']
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Set up PDM
uses: pdm-project/setup-pdm@main
with:
python-version: ${{ matrix.python-version }}
- name: Set Variables
id: set_variables
run: |
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
git config --global init.defaultBranch main
- name: Install dependencies
run: python -m pip install -U copier
- name: Setup Tests(Unix)
run: bash tests/setup.sh
if: runner.os != 'Windows'
- name: Run Tests
run: |
pdm use -f ${{ matrix.python-version }}
pdm install -d
pdm run test
working-directory: ${{ github.workspace }}/tests/tmp
Release:
needs: Testing
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}