52 lines
1.1 KiB
YAML
52 lines
1.1 KiB
YAML
name: Python CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '**.py'
|
|
- 'requirements.txt'
|
|
- 'pyproject.toml'
|
|
- 'setup.py'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '**.py'
|
|
- 'requirements.txt'
|
|
- 'pyproject.toml'
|
|
- 'setup.py'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: self-hosted
|
|
container:
|
|
image: ghcr.io/slipstreamm/disagreement-image:latest
|
|
options: --user 1001:1001
|
|
|
|
steps:
|
|
- name: Who am I
|
|
run: id
|
|
- name: Check DNS
|
|
run: nslookup github.com
|
|
- name: Ping github.com
|
|
run: ping -c 2 github.com
|
|
- name: Try git clone
|
|
run: |
|
|
apk add --no-cache git ca-certificates
|
|
git clone https://github.com/Slipstreamm/disagreement.git /tmp/testclone
|
|
- name: Test outbound TCP 443
|
|
run: apk add --no-cache busybox-extras && timeout 5 nc -vz github.com 443 || echo "connection failed"
|
|
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run Pyright
|
|
run: pyright
|
|
|
|
- name: Run Tests
|
|
run: pytest tests/
|