Skip to content

[pre-commit.ci] pre-commit autoupdate #64

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #64

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- '*'
pull_request:
permissions:
contents: read
env:
ARCH_ON_CI: "normal"
IS_CRON: "false"
jobs:
initial_checks:
name: Mandatory checks before CI
runs-on: ubuntu-latest
steps:
- name: Check base branch
uses: actions/github-script@v3
if: github.event_name == 'pull_request'
with:
script: |
const skip_label = 'skip-basebranch-check';
const { default_branch: allowed_basebranch } = context.payload.repository;
const pr = context.payload.pull_request;
if (pr.labels.find(lbl => lbl.name === skip_label)) {
core.info(`Base branch check is skipped due to the presence of ${skip_label} label`);
return;
}
if (pr.base.ref !== allowed_basebranch) {
core.setFailed(`PR opened against ${pr.base.ref}, not ${allowed_basebranch}`);
} else {
core.info(`PR opened correctly against ${allowed_basebranch}`);
}
tests:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1
with:
envs: |
- linux: py311-test-cov
- linux: py310-test-alldeps
toxargs: '-v --develop'
- linux: py39-test-oldestdeps-alldeps-cov
# - windows: py310-test-alldeps
# - macos: py310-test-alldeps
conda: true
coverage: codecov
fail-fast: false
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}