diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-11-29 22:07:27 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-11-29 22:08:55 +0300 |
commit | 47cb22aafcd08a1305567ac25112acfe5c4cfda4 (patch) | |
tree | 2e316db6a3ffb72d44e6506513f28e82aac3fea6 | |
parent | bye-bye, Travis (diff) | |
download | sorting-algorithms-47cb22aafcd08a1305567ac25112acfe5c4cfda4.tar.gz sorting-algorithms-47cb22aafcd08a1305567ac25112acfe5c4cfda4.zip |
add GitHub workflow
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/test.yml | 35 | ||||
-rwxr-xr-x | plot.sh | 2 |
2 files changed, 36 insertions, 1 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1eb7361 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Test + +on: + push: + pull_request: + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-18.04 + + env: + PIP_DISABLE_PIP_VERSION_CHECK: 1 + PIP_NO_PYTHON_VERSION_WARNING: 1 + + strategy: + matrix: + python-version: [3.4, 3.5, 3.6, 3.7, 3.8, 3.9] + + name: 'Python ${{ matrix.python-version }}' + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '${{ matrix.python-version }}' + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Run the tests + run: ./.ci/plot.sh @@ -34,7 +34,7 @@ main() { local input_kind for input_kind in best average worst; do local output_path="$script_dir/${algorithm}_${iterations}_${input_kind}_${min}_${max}.png" - python3 "$script_dir/plot.py" \ + python "$script_dir/plot.py" \ "$algorithm" \ --input "$input_kind" \ --min "$min" --max "$max" \ |