Skip to content

Test in Docker with Alpine Linux on CI #1826

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Feb 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Test Alpine Linux on CI
With only one version of Python, currently 3.11.
  • Loading branch information
EliahKagan committed Feb 15, 2024
commit 44b856268d7c8259e4cce0d5ba560130201610c9
56 changes: 56 additions & 0 deletions .github/workflows/alpine-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: test-alpine

on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest

container:
image: alpine:latest

defaults:
run:
shell: sh -exo pipefail {0}

steps:
- name: Install Alpine Linux packages
run: |
apk add git git-daemon python3 py3-pip

- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Prepare this repo for tests
run: |
./init-tests-after-clone.sh

- name: Set git user identity and command aliases for the tests
run: |
git config --global user.email "[email protected]"
git config --global user.name "Travis Runner"
# If we rewrite the user's config by accident, we will mess it up
# and cause subsequent tests to fail
cat test/fixtures/.gitconfig >> ~/.gitconfig

- name: Update PyPA packages
run: |
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
python -m pip install -U pip $(pip freeze --all | grep -ow ^setuptools) wheel

- name: Install project and test dependencies
run: |
pip install ".[test]"

- name: Show version and platform information
run: |
uname -a
command -v git python
git version
python --version
python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")'

- name: Test with pytest
run: |
pytest --color=yes -p no:sugar --instafail -vv