-
Notifications
You must be signed in to change notification settings - Fork 11
63 lines (61 loc) · 1.45 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
name: ci
on:
pull_request:
branches:
- "main"
- "alpha"
push:
branches:
- "main"
- "alpha"
jobs:
commitlint:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Commitlint
uses: wagoid/commitlint-github-action@v5
test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Compose Up
run: docker-compose up -d
- name: Test
run: docker compose exec test poetry run pytest
- name: Compose Down
run: docker-compose down
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Poetry Build
run: |
poetry check
poetry build
release:
runs-on: ubuntu-22.04
if: github.event_name == 'push'
needs:
- commitlint
- build
- test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install semantic-release
run: npm i semantic-release@^23.0.0 conventional-changelog-conventionalcommits@^7.0.0
- name: Release
env:
GITHUB_USERNAME: ${{ secrets.GH_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release