Skip to content

Remove the lgtm

Remove the lgtm #231

Workflow file for this run

name: CI Roberto
on:
push:
tags:
- '[1-9]+.[0-9]+.[0-9]+*'
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
# These are quick tests using Python's venv on different Python versions.
test-venv:
timeout-minutes: 30
if: "! startsWith(github.ref, 'refs/tags')"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
python-version: 3.8
- os: ubuntu-latest
python-version: 3.9
- os: ubuntu-latest
python-version: '3.10'
- os: ubuntu-latest
python-version: '3.11'
- os: ubuntu-latest
python-version: '3.12'
- os: macos-latest
python-version: 3.8
- os: macos-latest
python-version: 3.9
- os: macos-latest
python-version: '3.10'
- os: macos-latest
python-version: '3.11'
- os: macos-latest
python-version: '3.12'
runs-on: ${{ matrix.os }}
env:
# Tell Roberto to upload coverage results
ROBERTO_UPLOAD_COVERAGE: 1
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Fetch base branch (usually master/main)
run: |
if [[ -n "${GITHUB_HEAD_REF}" ]]; then
git fetch origin ${GITHUB_BASE_REF} --depth=2
fi
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- uses: actions/cache@v4
with:
path: ~/.local/venvs
key: ${{ runner.os }}-Python-${{ matrix.python-version }}-venv
- name: Install Pip and Roberto
run: |
python -m pip install --upgrade pip
python -m pip install roberto>=2.0.0
python -m pip install --upgrade setuptools
- name: Test with Roberto
run: |
if [[ -n "${GITHUB_HEAD_REF}" ]]; then
ROBERTO_GIT_MERGE_BRANCH=${GITHUB_SHA} \
ROBERTO_GIT_BRANCH=${GITHUB_BASE_REF} \
python -m roberto
else
ROBERTO_TESTENV_USE=venv \
python -m roberto robot
fi
test-conda:
# This is a slow test in a Conda environment, including deployment of
# tagged releases.
timeout-minutes: 30
if: (github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags')
strategy:
fail-fast: false
runs-on: ubuntu-latest
env:
ROBERTO_UPLOAD_COVERAGE: 1
ROBERTO_PACKAGE_MANAGER: conda
ROBERTO_TESTENV_USE: conda
ROBERTO_DEPLOY_NOARCH: 1
TWINE_USERNAME: theochem
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/miniconda3
!~/miniconda3/conda-bld
!~/miniconda3/locks
!~/miniconda3/pkgs
!~/miniconda3/var
!~/miniconda3/envs/*/conda-bld
!~/miniconda3/envs/*/locks
!~/miniconda3/envs/*/pkgs
!~/miniconda3/envs/*/var
key: ${{ runner.os }}-conda-3
- name: Install Roberto
run: |
python -m pip install roberto>=2.0.0
- name: Test and deploy with Roberto
run: |
conda info
python --version
python -m roberto robot