Skip to content

Commit

Permalink
PR: Move CIs to github actions (#316)
Browse files Browse the repository at this point in the history
Update CIs to github actions and upgrade node dependencies

Co-authored-by: Edgar Andrés Margffoy Tuay <andfoy@gmail.com>
  • Loading branch information
steff456 and andfoy authored Mar 29, 2022
1 parent 703cfdd commit 37130c1
Show file tree
Hide file tree
Showing 16 changed files with 275 additions and 385 deletions.
47 changes: 0 additions & 47 deletions .circleci/config.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -ex

# Install dependencies
if [[ "$OS" == "win" ]]
then
mamba install -q -y -c conda-forge --file requirements/conda_win.txt
else
mamba install -q -y -c conda-forge --file requirements/conda.txt
fi


# Install test dependencies
mamba install -q -y -c conda-forge --file requirements/tests.txt

mamba install -q codecov
67 changes: 67 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Linux tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Py${{ matrix.PYTHON_VERSION }}, ${{ matrix.INSTALL_TYPE }}
runs-on: ubuntu-latest
env:
CI: 'true'
CODECOV_TOKEN: "273c981b-7851-4895-a4bb-07377c67791e"
OS: 'linux'
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
USE_CONDA: ${{ matrix.INSTALL_TYPE == 'conda' }}
USE_GDB: 'false'
strategy:
fail-fast: false
matrix:
INSTALL_TYPE: ['conda']
PYTHON_VERSION: ['3.7', '3.8', '3.9']
timeout-minutes: 120
steps:
- name: checkout branch
uses: actions/checkout@v3
- name: Install dependencies
shell: bash
run: |
sudo apt-get update --fix-missing
sudo apt-get install -qq pyqt5-dev-tools libxcb-xinerama0 xterm --fix-missing
- name : Setup miniforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
python-version: ${{ matrix.PYTHON_VERSION }}
mamba-version: "*"
use-mamba: true
channels: conda-forge,defaults
channel-priority: true
activate-environment: test
miniforge-version: latest
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '13'
- name: Create test environment
shell: bash -l {0}
run: bash -l .github/scripts/install.sh
- name: Show test environment
shell: bash -l {0}
run: |
conda info
conda list
- name: Build static resources
shell: bash -l {0}
run: python setup.py build_static
- name: Run tests
shell: bash -l {0}
run: xvfb-run --auto-servernum python runtests.py || xvfb-run --auto-servernum python runtests.py || xvfb-run --auto-servernum python runtests.py || xvfb-run --auto-servernum python runtests.py || xvfb-run --auto-servernum python runtests.py
- name: Coverage
shell: bash -l {0}
run: codecov
70 changes: 70 additions & 0 deletions .github/workflows/test-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Mac tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Py${{ matrix.PYTHON_VERSION }}, ${{ matrix.INSTALL_TYPE }}
runs-on: macos-latest
env:
CI: 'true'
CODECOV_TOKEN: "273c981b-7851-4895-a4bb-07377c67791e"
OS: 'mac'
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
USE_CONDA: ${{ matrix.INSTALL_TYPE == 'conda' }}
USE_GDB: 'false'
strategy:
fail-fast: false
matrix:
INSTALL_TYPE: ['conda']
PYTHON_VERSION: ['3.7', '3.8', '3.9']
timeout-minutes: 120
steps:
- name: checkout branch
uses: actions/checkout@v3
- name : Setup miniforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
python-version: ${{ matrix.PYTHON_VERSION }}
mamba-version: "*"
use-mamba: true
channels: conda-forge,defaults
channel-priority: true
activate-environment: test
miniforge-version: latest
- name: Create test environment
shell: bash -l {0}
run: bash -l .github/scripts/install.sh
- name: Show test environment
shell: bash -l {0}
run: |
conda info
conda list
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '13'
- name: Node and NPM version
shell: bash -l {0}
run: |
export PATH=/Users/runner/hostedtoolcache/node/13.14.0/x64/bin:$PATH
node -v
npm -v
- name: Build static resources
shell: bash -l {0}
run: |
export PATH=/Users/runner/hostedtoolcache/node/13.14.0/x64/bin:$PATH
python setup.py build_static
- name: Run tests
shell: bash -l {0}
run: python runtests.py || python runtests.py || python runtests.py || python runtests.py || python runtests.py
- name: Coverage
shell: bash -l {0}
run: codecov
62 changes: 62 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Windows tests

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
name: Py${{ matrix.PYTHON_VERSION }}, ${{ matrix.INSTALL_TYPE }}
runs-on: windows-latest
env:
CI: 'true'
CODECOV_TOKEN: "273c981b-7851-4895-a4bb-07377c67791e"
OS: 'win'
PYTHON_VERSION: ${{ matrix.PYTHON_VERSION }}
USE_CONDA: ${{ matrix.INSTALL_TYPE == 'conda' }}
USE_GDB: 'false'
strategy:
fail-fast: false
matrix:
INSTALL_TYPE: ['conda']
PYTHON_VERSION: ['3.7', '3.8', '3.9']
timeout-minutes: 120
steps:
- name: checkout branch
uses: actions/checkout@v3
- name : Setup miniforge
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
python-version: ${{ matrix.PYTHON_VERSION }}
mamba-version: "*"
use-mamba: true
channels: conda-forge,defaults
channel-priority: true
activate-environment: test
miniforge-version: latest
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '13'
- name: Create test environment
shell: bash -l {0}
run: bash -l .github/scripts/install.sh
- name: Show test environment
shell: bash -l {0}
run: |
conda info
conda list
- name: Build static resources
shell: bash -l {0}
run: python setup.py build_static
- name: Run tests
shell: bash -l {0}
run: python runtests.py || python runtests.py || python runtests.py || python runtests.py || python runtests.py
- name: Coverage
shell: bash -l {0}
run: codecov
Loading

0 comments on commit 37130c1

Please sign in to comment.