-
-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (88 loc) · 2.73 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
---
name: CI
on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
push:
branches: [master]
workflow_dispatch:
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
pytest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade -r requirements.txt
python -m pip install --upgrade -r requirements-dev.txt
- name: Test with pytest
id: test
shell: bash
run: |
python -m pytest \
-rxXs \
--tb=native \
--verbose \
--color=yes \
--cov=action \
tests
- name: Upload coverage
# any except canceled or skipped
if: >-
always() &&
(steps.test.outcome == 'success' || steps.test.outcome == 'failure') &&
startsWith(github.repository, 'LizardByte/')
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
action:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: facebook-post-action
uses: ./
with:
access_token: ${{ secrets.FACEBOOK_ACCESS_TOKEN }}
fail_on_error: true
message: |
${{ github.event.repository.name }} - ${{ github.ref_name }} test
page_id: ${{ secrets.FACEBOOK_PAGE_ID }}
url: ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}
release:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs:
- pytest
- action
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Release
id: setup-release
uses: LizardByte/setup-release-action@v2024.919.143601
with:
github_token: ${{ secrets.GH_BOT_TOKEN }}
- name: Create Release
id: action
uses: LizardByte/create-release-action@v2024.919.143026
with:
allowUpdates: false
artifacts: ''
body: ${{ steps.setup-release.outputs.release_body }}
generateReleaseNotes: ${{ steps.setup-release.outputs.release_generate_release_notes }}
name: ${{ steps.setup-release.outputs.release_tag }}
prerelease: true
tag: ${{ steps.setup-release.outputs.release_tag }}
token: ${{ secrets.GH_BOT_TOKEN }}