Skip to content

Commit ca44032

Browse files
committed
ci: configure github actions
1 parent b3a74ad commit ca44032

21 files changed

+239
-351
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ CURRENT_COMMIT=$(git rev-parse HEAD)
8888
if [ "$ARG1" ]; then
8989
PREVIOUS_COMMIT=$(git merge-base HEAD "$ARG1")
9090
else
91-
PREVIOUS_COMMIT=$(git show --pretty=raw HEAD |
92-
awk '/^parent /{ print $2; exit }')
91+
PREVIOUS_COMMIT=$(git show -s --pretty=%P "$CURRENT_COMMIT")
92+
# PREVIOUS_COMMIT=$(git show --pretty=raw HEAD | awk '/^parent /{ print $2; exit }')
9393
fi
9494

9595
echo
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Cleanup workflow
2+
3+
on: [push]
4+
5+
# This is a temporary solution until Github actions provide an official support for this.
6+
# Workflow ids are located here: https://api.github.com/repos/biolab/orange3/actions/workflows
7+
8+
jobs:
9+
cancel:
10+
name: 'Cancel Previous Runs'
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 3
13+
14+
steps:
15+
- name: Cleanup Linux workflow
16+
uses: styfle/cancel-workflow-action@0.2.0
17+
with:
18+
workflow_id: 685155
19+
access_token: ${{ secrets.GITHUB_TOKEN }}
20+
21+
- name: Cleanup macOS workflow
22+
uses: styfle/cancel-workflow-action@0.2.0
23+
with:
24+
workflow_id: 685156
25+
access_token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- name: Cleanup Windows workflow
28+
uses: styfle/cancel-workflow-action@0.2.0
29+
with:
30+
workflow_id: 685157
31+
access_token: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Cleanup Documentation workflow
34+
uses: styfle/cancel-workflow-action@0.2.0
35+
with:
36+
workflow_id: 685153
37+
access_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/doc_workflow.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Documentation workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: False
16+
matrix:
17+
python: [3.7]
18+
os: [ubuntu-18.04]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Setup Python
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: ${{ matrix.python }}
26+
27+
- name: Install linux system dependencies
28+
run: sudo apt-get install -y libxkbcommon-x11-0
29+
30+
- name: Install Tox
31+
run: pip install tox
32+
33+
- name: Build documentation
34+
run: xvfb-run -a -s "-screen 0 1280x1024x24" tox -e build_doc
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Lint workflow
2+
3+
on:
4+
# Trigger the workflow on push or pull request, but only for the master branch
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: False
17+
matrix:
18+
python: [3.7]
19+
os: [ubuntu-18.04]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: '2'
25+
- name: Setup Python
26+
uses: actions/setup-python@v1
27+
with:
28+
python-version: ${{ matrix.python }}
29+
30+
- name: Install Tox
31+
run: pip install tox
32+
33+
- name: Run Pylint
34+
run: tox -e pylint-ci
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Linux workflow
2+
3+
on:
4+
# Trigger the workflow on push or pull request, but only for the master branch
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: False
17+
matrix:
18+
python: [3.6, 3.7]
19+
os: [ubuntu-18.04]
20+
21+
services:
22+
postgres:
23+
image: orangedm/postgres:11
24+
env:
25+
POSTGRES_USER: postgres_user
26+
POSTGRES_PASSWORD: postgres_password
27+
POSTGRES_DB: postgres_db
28+
ports:
29+
- 5432:5432
30+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
31+
32+
SQLServer:
33+
image: mcr.microsoft.com/mssql/server:2017-latest
34+
env:
35+
ACCEPT_EULA: Y
36+
SA_PASSWORD: sqlServerPassw0rd
37+
ports:
38+
- 1433:1433
39+
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: Setup Python
43+
uses: actions/setup-python@v1
44+
with:
45+
python-version: ${{ matrix.python }}
46+
47+
- name: Install linux system dependencies
48+
run: sudo apt-get install -y libxkbcommon-x11-0
49+
50+
- name: Install Tox
51+
run: pip install tox
52+
53+
- name: Run Tox
54+
run: xvfb-run -a -s "-screen 0 1280x1024x24" tox -e coverage
55+
env:
56+
ORANGE_TEST_DB_URI: postgres://postgres_user:postgres_password@localhost:5432/postgres_db|mssql://SA:sqlServerPassw0rd@localhost:1433
57+
58+
- name: Upload code coverage
59+
if: matrix.python == '3.7'
60+
run: |
61+
pip install codecov
62+
codecov
63+
env:
64+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: macOS workflow
2+
3+
on:
4+
# Trigger the workflow on push or pull request, but only for the master branch
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: False
17+
matrix:
18+
python: [3.6, 3.7]
19+
os: [macos-10.15]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Setup Python
24+
uses: actions/setup-python@v1
25+
with:
26+
python-version: ${{ matrix.python }}
27+
28+
- name: Install Tox
29+
run: pip install tox
30+
31+
- name: Run Tox
32+
run: tox -e py
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Windows workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
fail-fast: False
16+
matrix:
17+
python: [3.6, 3.7]
18+
os: [windows-2016]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Setup Python
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: ${{ matrix.python }}
26+
27+
- name: Install Tox
28+
run: pip install tox
29+
30+
- name: Run Tox
31+
run: tox -e py

.travis.yml

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

.travis/install_mssql.sh

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

.travis/install_orange.sh

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

0 commit comments

Comments
 (0)