forked from flinteger/dnss-blocklists
-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (45 loc) · 1.33 KB
/
CI.yml
File metadata and controls
54 lines (45 loc) · 1.33 KB
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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
CI:
# https://github.com/actions/runner-images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
architecture: x64
- name: Check build env
run: |
echo "pwd: $(pwd)"
echo "USER: $USER"
echo "HOME: $HOME"
echo "SHELL: $SHELL"
echo "PATH: $PATH"
python3 --version
pip3 --version
- name: Get pip cache directory
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache pip dependencies
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-python-3.11-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-python-3.11-${{ hashFiles('**/requirements.txt') }}
${{ runner.os }}-python-3.11-
- name: Setup
run: |
# pip install binary to $HOME/.local/bin
# export PATH="$PATH:$HOME/.local/bin"
#
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
echo "/home/runner/.local/bin" >> $GITHUB_PATH