This repository has been archived by the owner on Dec 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
72 lines (61 loc) · 1.77 KB
/
task.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
name: task
on:
create: # is used for publishing to PyPI and TestPyPI
tags: # any tag regardless of its name, no branches
- "**"
push: # only publishes pushes to the main branch to TestPyPI
branches: # any integration branch but not tag
- "main"
pull_request:
release:
types:
- published # It seems that you can publish directly without creating
- prereleased
schedule:
- cron: 1 0 * * * # Run daily at 0:01 UTC
# Run every Friday at 18:02 UTC
# https://crontab.guru/#2_18_*_*_5
# - cron: 2 18 * * 5
jobs:
task:
runs-on: ubuntu-latest
name: ${{ matrix.task_name }}
strategy:
matrix:
node-version: [16.x]
task_name:
- test
- lint
steps:
- uses: actions/checkout@v3
# https://github.com/actions/cache
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: task ${{ matrix.task_name }}
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- task
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}