Skip to content

Commit 27d8fb0

Browse files
authored
Merge pull request #1199 from arnaudj/dev/migrateTravisToGitHubActions
Migrate CI tests to use github actions
2 parents cfc01fa + 608e3dd commit 27d8fb0

File tree

4 files changed

+53
-41
lines changed

4 files changed

+53
-41
lines changed

.travis.s3cfg renamed to .ci.s3cfg

File renamed without changes.

.github/workflows/test.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Test
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
11+
env:
12+
cache-revision: 1
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install .
23+
- name: Cache minio
24+
id: cache-minio
25+
uses: actions/cache@v2
26+
env:
27+
cache-name: cache-minio
28+
with:
29+
path: ~/cache
30+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.cache-revision }}
31+
- name: Download minio on cache miss
32+
if: steps.cache-minio.outputs.cache-hit != 'true'
33+
run: |
34+
mkdir -p ~/cache
35+
test ! -e ~/cache/minio && wget -O ~/cache/minio https://dl.minio.io/server/minio/release/linux-amd64/minio || echo "Minio already in cache"
36+
- name: Start a local instance of minio
37+
run: |
38+
export AWS_ACCESS_KEY_ID=Q3AM3UQ867SPQQA43P2F
39+
export AWS_SECRET_ACCESS_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
40+
export MINIO_ACCESS_KEY=Q3AM3UQ867SPQQA43P2F
41+
export MINIO_SECRET_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG
42+
chmod +x ~/cache/minio
43+
mkdir -p ~/minio_tmp
44+
~/cache/minio server ~/minio_tmp &
45+
sleep 4 # give minio some time to start
46+
- name: Run tests
47+
## Tests stopped at test 23 because minio doesn't support "quote_plus" used in signatures.
48+
run: python ./run-tests-minio.py -c .ci.s3cfg -p baseauto
49+
- name: Terminate
50+
if: always()
51+
continue-on-error: true
52+
run: killall minio

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## S3cmd tool for Amazon Simple Storage Service (S3)
22

3-
[![Build Status](https://travis-ci.org/s3tools/s3cmd.svg?branch=master)](https://travis-ci.org/s3tools/s3cmd)
3+
[![Build Status](https://github.com/s3tools/s3cmd/actions/workflows/test.yml/badge.svg)](https://github.com/s3tools/s3cmd/actions/workflows/test.yml)
44

55
* Author: Michal Ludvig, [email protected]
66
* [Project homepage](http://s3tools.org)

0 commit comments

Comments
 (0)