Skip to content
Closed
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
8 changes: 6 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,14 @@ jobs:
run: |
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get -qq update
sudo apt-get install -y python${{ matrix.python }} python${{ matrix.python }}-distutils
sudo pip install autopep8
sudo apt-get install -y python${{ matrix.python }} python${{ matrix.python }}-distutils python${{ matrix.python }}-venv
- name: Run Python tests
run: |
python3 -v
python${{ matrix.python }} -m venv python/myenv
source python/myenv/bin/activate
python3 -v
python3 -m pip install autopep8
bin/before-install
bin/test
env:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# test
# CI::Queue

[![Gem Version](https://badge.fury.io/rb/ci-queue.svg)](https://rubygems.org/gems/ci-queue)
[![Tests](https://github.com/Shopify/ci-queue/workflows/Tests/badge.svg?branch=master)](https://github.com/Shopify/ci-queue/actions?query=workflow%3ATests)

Distribute tests over many workers using a queue.
Distribute tests over many workers using a queue.

## Why a queue?

Expand Down Expand Up @@ -48,4 +49,3 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/Shopif
## License

The code is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

10 changes: 6 additions & 4 deletions bin/before-install
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ end
case ENV['SUITE']
when 'python'
Dir.chdir('python/') do
run('sudo', 'pip', 'install', '-U', 'pip')
run('sudo', 'pip', 'install', 'setuptools==68.0.0')
run('pip', '--version')
run('sudo', 'make', 'install')
run('python3', '-m', 'pip', '--version')
run('python3', '-m', 'pip', 'install', '-U', 'pip')
run('python3', '-m', 'pip', 'install', 'setuptools==68.0.0')
run('python3', '-m', 'pip', '--version')
run('make', 'install')
run('ls', '-l', 'myenv/bin/')
end
when 'ruby'
else
Expand Down
2 changes: 1 addition & 1 deletion bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ when 'python'
environment['TOX_ENV'] = tox_py_env
end
Dir.chdir('python/') do
run(environment, 'sudo', '--preserve-env', 'make', 'test')
run(environment, 'make', 'test')
end
when 'ruby'
Dir.chdir('ruby/') do
Expand Down
10 changes: 6 additions & 4 deletions python/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Copyright (c) 2017 "Shopify inc." All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.
PYTHON ?= python3
python_files := find . -path '*/.*' -prune -o -name '*.py' -print0
python_version_full := $(wordlist 2,4,$(subst ., ,$(shell python --version 2>&1)))
python_version_full := $(wordlist 2,4,$(subst ., ,$(shell $(PYTHON) --version 2>&1)))
python_version_major := $(word 1,${python_version_full})

TOX_ENV ?= py37,py38,py39,py310,py311
Expand All @@ -14,7 +15,7 @@ clean:

autopep8:
@echo 'Auto Formatting...'
@$(python_files) | xargs -0 autopep8 --jobs 0 --in-place --aggressive --global-config setup.cfg
@$(python_files) | xargs -0 myenv/bin/autopep8 --jobs 0 --in-place --aggressive --global-config setup.cfg

lint:
@echo 'Linting...'
Expand All @@ -29,11 +30,12 @@ run_tests: clean
test: autopep8 run_tests

install:
pip install --ignore-installed six -e .[test]
@$(PYTHON) -v
$(PYTHON) -m pip install --ignore-installed six -e .[test]

release:
rm -rf build dist
@python setup.py sdist bdist_wheel
@$(PYTHON) setup.py sdist bdist_wheel

upload_test: release
@twine upload dist/* -r testpypi
Expand Down
Loading