-
Notifications
You must be signed in to change notification settings - Fork 162
35 lines (35 loc) · 1.29 KB
/
run-checks.yaml
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
name: Run checks
on:
pull_request:
jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install act
run: |
# Install act
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
echo "-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
-P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04" > ~/.actrc
echo "PATH=$PATH:$(pwd)/bin" >> "$GITHUB_ENV"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
- name: Generate CICD Zip
run: |
cd template/{{.input_root_dir}}
cp --parents .github/workflows/\{\{.input_project_name\}\}-* cicd/template
cp --parents .azure/devops-pipelines/\{\{.input_project_name\}\}-* cicd/template
tar -czvf cicd.tar.gz cicd
rm -rf cicd/template/.github cicd/template/.azure
cd ../..
- name: Run tests with pytest
run: |
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
pytest tests --large -vv --black