Skip to content

Commit 44b8562

Browse files
committed
Test Alpine Linux on CI
With only one version of Python, currently 3.11.
1 parent 1f37b48 commit 44b8562

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/alpine-test.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: test-alpine
2+
3+
on: [push, pull_request, workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
9+
container:
10+
image: alpine:latest
11+
12+
defaults:
13+
run:
14+
shell: sh -exo pipefail {0}
15+
16+
steps:
17+
- name: Install Alpine Linux packages
18+
run: |
19+
apk add git git-daemon python3 py3-pip
20+
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Prepare this repo for tests
26+
run: |
27+
./init-tests-after-clone.sh
28+
29+
- name: Set git user identity and command aliases for the tests
30+
run: |
31+
git config --global user.email "travis@ci.com"
32+
git config --global user.name "Travis Runner"
33+
# If we rewrite the user's config by accident, we will mess it up
34+
# and cause subsequent tests to fail
35+
cat test/fixtures/.gitconfig >> ~/.gitconfig
36+
37+
- name: Update PyPA packages
38+
run: |
39+
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
40+
python -m pip install -U pip $(pip freeze --all | grep -ow ^setuptools) wheel
41+
42+
- name: Install project and test dependencies
43+
run: |
44+
pip install ".[test]"
45+
46+
- name: Show version and platform information
47+
run: |
48+
uname -a
49+
command -v git python
50+
git version
51+
python --version
52+
python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'
53+
54+
- name: Test with pytest
55+
run: |
56+
pytest --color=yes -p no:sugar --instafail -vv

0 commit comments

Comments
 (0)