-
Notifications
You must be signed in to change notification settings - Fork 409
81 lines (77 loc) · 2.54 KB
/
ci.yaml
File metadata and controls
81 lines (77 loc) · 2.54 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: ci
on:
pull_request:
push:
branches:
- main
permissions: {}
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ">=3.7"
cache: pip
cache-dependency-path: |
.github/requirements.txt
test/requirements*.txt
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.cache/pre-commit
key: pre-commit-${{hashFiles('.pre-commit-config.yaml')}}
- name: Install dependencies
run: |
python3 -m venv venv # for venv-run
source venv/bin/activate
python3 -m pip install -Ur .github/requirements.txt
- name: Run pre-commit checks
run: |
source venv/bin/activate
pre-commit run --color=always --all-files --show-diff-on-failure
distcheck:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- dist: alpine
- dist: centos7
- dist: debian10
- dist: debian10
bsd: true
network: none
- dist: fedoradev
- dist: ubuntu14
fail-fast: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
# A "container" workflow config would be cleaner here, but comes with
# some restrictions/oddities: changes root's $HOME to /github/home
# without changing the actual home dir that can cause some problems,
# and does not provide a way to run with --network none.
- name: Run main build
run: >-
docker run
--rm
--tty
--env CI=true
--env BSD=${{matrix.bsd}}
--env PYTESTFLAGS="--verbose -p no:cacheprovider"
--env NETWORK=$NETWORK
--env BASH_COMPLETION_TEST_LIVE_SSH_HOST=localhost
${NETWORK:+--network $NETWORK}
--volume $PWD:/usr/src/bash-completion
--workdir /usr/src/bash-completion
ghcr.io/scop/bash-completion/test:${{matrix.dist}}
test/docker/entrypoint.sh
env:
NETWORK: ${{matrix.network}}
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
path: bash-completion-*.tar.xz
if: matrix.dist == 'alpine'