Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
123 changes: 123 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: test

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

permissions:
contents: read

jobs:
download:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install test dependencies
run: ./scripts/ci-install.sh

- name: Upload test dependencies
uses: actions/upload-artifact@v4
with:
name: test-dependencies
path: tests/data/ux.stackexchange.com.7z
if-no-files-found: error
compression-level: 0

python2:
needs: download

runs-on: ubuntu-latest
container:
image: python:2.7.18-buster

strategy:
fail-fast: false
matrix:
python-version:
- "2.7"

steps:
- uses: actions/checkout@v4

- name: Build module
run: python setup.py build

- name: Download test dependencies
uses: actions/download-artifact@v4
with:
name: test-dependencies
path: tests/data

- name: Run tests
run: python setup.py test

python3-old:
needs: download

runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
python-version:
- "3.5"
- "3.6"
- "3.7"

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Build module
run: python setup.py build

- name: Download test dependencies
uses: actions/download-artifact@v4
with:
name: test-dependencies
path: tests/data

- name: Run tests
run: python setup.py test

python3:
needs: download

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Build module
run: python setup.py build

- name: Download test dependencies
uses: actions/download-artifact@v4
with:
name: test-dependencies
path: tests/data

- name: Run tests
run: python setup.py test
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* **7-Zip** Copyright (C) 1999-2010 Igor Pavlov
* **LZMA SDK** Copyright (C) 1999-2010 Igor Pavlov

[![Linux Build Status](https://travis-ci.org/fancycode/pylzma.svg?branch=master)](https://travis-ci.org/fancycode/pylzma)
[![Linux Build Status](https://github.com/fancycode/pylzma/workflows/test/badge.svg)](https://github.com/fancycode/pylzma/actions)
[![Windows Build Status](https://ci.appveyor.com/api/projects/status/5a7k7v9k2a0eiuom/branch/master?svg=true
)](https://ci.appveyor.com/project/fancycode/pylzma)

Expand Down
16 changes: 0 additions & 16 deletions scripts/ci-install.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
#!/bin/bash
set -e

if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
if [[ $PYVER == '2' ]]; then
formula="python${PYVER}"
else
formula="python"
fi
# Update Python if already installed, otherwise install.
echo "Installing / updating ${formula} ..."
if [[ $PYVER == '3' ]]; then
brew list "${formula}" &>/dev/null && brew upgrade "${formula}"
fi
brew list "${formula}" &>/dev/null || brew install "${formula}"
echo -n "Using: "
"python$PYVER" --version
fi

echo "Downloading ux.stackexchange.com.7z ..."
mkdir -p $HOME/.downloads
( cd $HOME/.downloads && wget --no-check-certificate --timestamping https://archive.org/download/stackexchange/ux.stackexchange.com.7z )
Expand Down
Loading