Update CI. #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push] | |
# Automatically stop old builds on the same branch/PR | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -el {0} | |
jobs: | |
pre-commit-checks: | |
name: Pre-commit checks | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/checkout@v4 | |
- name: Run pre-commit-conda | |
uses: quantco/pre-commit-conda@v1 | |
tests: | |
name: Tests | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/[email protected] | |
with: | |
miniforge-version: latest | |
miniforge-variant: Mambaforge | |
channels: conda-forge | |
- shell: bash -l {0} | |
run: | | |
conda info | |
conda list | |
conda config --show-sources | |
conda config --show | |
printenv | sort | |
- shell: bash -l {0} | |
run: | | |
mamba env create | |
source $CONDA/bin/activate matchingR | |
R CMD build . | |
R CMD INSTALL matchingR_*.tar.gz | |
_R_CHECK_CRAN_INCOMING_=false R CMD check --as-cran --no-vignettes --no-manual matchingR_*.tar.gz | |
if cat matchingR.Rcheck/00check.log | grep -q "WARNING"; then | |
echo "Found warnings, treated as errors." | |
exit 1 | |
fi |