diff --git a/.travis.s3cfg b/.ci.s3cfg similarity index 100% rename from .travis.s3cfg rename to .ci.s3cfg diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..c0e26fdba --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,52 @@ +name: Test + +on: [push, workflow_dispatch] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9] + env: + cache-revision: 1 + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install . + - name: Cache minio + id: cache-minio + uses: actions/cache@v2 + env: + cache-name: cache-minio + with: + path: ~/cache + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.cache-revision }} + - name: Download minio on cache miss + if: steps.cache-minio.outputs.cache-hit != 'true' + run: | + mkdir -p ~/cache + test ! -e ~/cache/minio && wget -O ~/cache/minio https://dl.minio.io/server/minio/release/linux-amd64/minio || echo "Minio already in cache" + - name: Start a local instance of minio + run: | + export AWS_ACCESS_KEY_ID=Q3AM3UQ867SPQQA43P2F + export AWS_SECRET_ACCESS_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG + export MINIO_ACCESS_KEY=Q3AM3UQ867SPQQA43P2F + export MINIO_SECRET_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG + chmod +x ~/cache/minio + mkdir -p ~/minio_tmp + ~/cache/minio server ~/minio_tmp & + sleep 4 # give minio some time to start + - name: Run tests + ## Tests stopped at test 23 because minio doesn't support "quote_plus" used in signatures. + run: python ./run-tests-minio.py -c .ci.s3cfg -p baseauto + - name: Terminate + if: always() + continue-on-error: true + run: killall minio diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b0f33b6c7..000000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -language: python -python: - - "2.7" - - "3.4" - - "3.5" - - "3.6" - - "3.7" - - "3.8" - - "3.9" -#matrix: -# allow_failures: -# - python: "3.5" -notifications: - email: false - irc: "chat.freenode.net#s3cmd" -# command to install dependencies -cache: - directories: - - $HOME/cache -install: - - pip install . -# command to prepare tests -before_install: - - mkdir -p $HOME/cache - - test ! -e $HOME/cache/minio && wget -O $HOME/cache/minio https://dl.minio.io/server/minio/release/linux-amd64/minio || echo "Minio already in cache" - - mkdir -p $HOME/minio_tmp -# Start a local instance of minio -before_script: - - "export AWS_ACCESS_KEY_ID=Q3AM3UQ867SPQQA43P2F" - - "export AWS_SECRET_ACCESS_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG" - - "export MINIO_ACCESS_KEY=Q3AM3UQ867SPQQA43P2F" - - "export MINIO_SECRET_KEY=zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG" - - chmod +x $HOME/cache/minio - - $HOME/cache/minio server $HOME/minio_tmp & - - sleep 4 # give minio some time to start -# command to run tests -## Tests stopped at test 23 because minio doesn't support "quote_plus" used in signatures. -script: python ./run-tests-minio.py -c .travis.s3cfg -p baseauto -after_script: - - killall minio diff --git a/README.md b/README.md index 402faa007..73366a1b5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## S3cmd tool for Amazon Simple Storage Service (S3) -[![Build Status](https://travis-ci.org/s3tools/s3cmd.svg?branch=master)](https://travis-ci.org/s3tools/s3cmd) +[![Build Status](https://github.com/s3tools/s3cmd/actions/workflows/test.yml/badge.svg)](https://github.com/s3tools/s3cmd/actions/workflows/test.yml) * Author: Michal Ludvig, michal@logix.cz * [Project homepage](http://s3tools.org)