Debian Codegraph @

.github/workflows/ci-python3-freebsd.yml

raw symbols SCIP
1 # This is a basic workflow to help you get started with Actions
2
3 name: CI python3 FreeBSD
4
5 # Controls when the action will run. Triggers the workflow on push or pull request
6 # events but only for the master branch
7 on:
8 push:
9 branches: [ python3 ]
10 pull_request:
11 branches: [ python3 ]
12 workflow_dispatch:
13 schedule:
14 - cron: '37 15 * * 5'
15
16 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
17 jobs:
18 # This workflow contains a single job called "build"
19 test:
20 # The type of runner that the job will run on
21 runs-on: ubuntu-latest
22
23 strategy:
24 matrix:
25 freebsd-release: [ '13.4', '13.5', '14.2', '14.3', '15.0' ]
26
27 # Steps represent a sequence of tasks that will be executed as part of the job
28 steps:
29 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30 - uses: actions/checkout@v4
31
32 - name: Test in FreeBSD
33 uses: vmactions/freebsd-vm@v1
34 with:
35 release: ${{ matrix.freebsd-release }}
36 usesh: true
37 prepare: pkg install -y python3 devel/py-pip coreutils cksfv git-tiny rust
38 run: |
39 set -ex
40
41 pwd
42 ls -lah
43 whoami
44 env
45 freebsd-version
46
47 ln -s /usr/local/bin/python3 /usr/local/bin/python
48 ln -s /usr/local/bin/gmd5sum /usr/local/bin/md5sum
49 ln -s /usr/local/bin/gsha1sum /usr/local/bin/sha1sum
50 ln -s /usr/local/bin/gsha224sum /usr/local/bin/sha224sum
51 ln -s /usr/local/bin/gsha256sum /usr/local/bin/sha256sum
52 ln -s /usr/local/bin/gsha384sum /usr/local/bin/sha384sum
53 ln -s /usr/local/bin/gsha512sum /usr/local/bin/sha512sum
54
55 pw groupadd docker -g 127
56 pw useradd runner -u 1001 -g docker
57
58 # Install test dependencies
59 pip install pyroma
60 pip install check-manifest
61 pip install twine
62 pip install wheel
63 pip install flake8
64 pip install build
65 pip list
66
67 # Check syntax by compiling code
68 python -W error -bb -m compileall -f .
69
70 # Run unit tests
71 su runner -c 'python -W error -bb test/test.py --unit --exit-early'
72
73 # Run integration tests (internal)
74 su runner -c 'ulimit -n; ulimit -n 4096; python -W error -bb test/test.py -i --exit-early'
75
76 # Run integration tests (external process)
77 su runner -c 'ulimit -n; ulimit -n 4096; test/test.py -e --exit-early'
78
79 # Check package quality
80 su runner -c 'pyroma -n 10 .'
81
82 # Check the completeness of MANIFEST.in
83 su runner -c 'check-manifest .'
84
85 # Run flake
86 flake8 --exclude=build,venv --ignore= --max-line-length=200 --max-complexity=75 --show-source --statistics .
87
88 # Check distribution
89 python -m build
90 twine check dist/*