-
Notifications
You must be signed in to change notification settings - Fork 10
46 lines (46 loc) · 1.71 KB
/
github-actions.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
name: policyd-rate-limit
run-name: ${{ github.actor }} is running policyd-rate-limit CI tests
on: [push]
jobs:
flake8:
runs-on: ubuntu-latest
container:
image: python:bookworm
steps:
- uses: actions/checkout@v3
- run: pip install tox
- run: apt-get update && apt-get install -y --no-install-recommends sudo
- run: useradd --uid 1000 testuser && mkdir -p /home/testuser && chown testuser -R . /home/testuser
- run: sudo -u testuser tox -e flake8
check_rst:
runs-on: ubuntu-latest
container:
image: python:bookworm
steps:
- uses: actions/checkout@v3
- run: pip install tox
- run: apt-get update && apt-get install -y --no-install-recommends sudo
- run: useradd --uid 1000 testuser && mkdir -p /home/testuser && chown testuser -R . /home/testuser
- run: sudo -u testuser tox -e check_rst
tests:
runs-on: ubuntu-latest
container:
image: python:bookworm
steps:
- uses: actions/checkout@v3
- run: pip install tox
- run: apt-get update && apt-get install -y --no-install-recommends sudo
- run: useradd --uid 1000 testuser && mkdir -p /home/testuser && chown testuser -R . /home/testuser
- run: sudo -u testuser tox -e py3
coverage:
runs-on: ubuntu-latest
container:
image: python:bookworm
steps:
- uses: actions/checkout@v3
- run: pip install tox
- run: apt-get update && apt-get install -y --no-install-recommends sudo
- run: useradd --uid 1000 testuser && mkdir -p /home/testuser && chown testuser -R . /home/testuser
- run: sudo --preserve-env=COVERAGE_TOKEN -u testuser tox -e coverage
env:
COVERAGE_TOKEN: ${{ secrets.COVERAGE_TOKEN }}