All checks were successful
Windows project source guards / test (push) Successful in 29s
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
name: Windows project source guards
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: android
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://data.forgejo.org/actions/checkout@v6
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Validate Python sources
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
git diff --check
|
|
if git grep -n -I -E -- 'git\.zapret\.moe/(api/v1/repos/)?zapretdiscordyoutube/([A-Za-z0-9._-]+-upstream|Xray-core)' -- ':!.forgejo/workflows/source-guards.yml'; then
|
|
echo 'Use the official third-party source instead of our retired mirror.' >&2
|
|
exit 1
|
|
fi
|
|
python3 -m compileall -q xray_fluent scripts tests
|
|
|
|
- name: Install test dependencies
|
|
shell: bash
|
|
run: |
|
|
set -euo pipefail
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends libegl1 libgl1 libxkbcommon0
|
|
python3 -m pip install --break-system-packages -r requirements.txt
|
|
|
|
- name: Run platform-independent tests
|
|
run: python3 -m unittest discover -s tests -v
|