Skip to content

Commit

Permalink
updates to github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
iancze committed Dec 7, 2023
1 parent 4da8adf commit 50706e3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gh_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install doc deps
Expand All @@ -24,7 +24,7 @@ jobs:
run: |
make -C docs clean
- name: Cache/Restore the AS 209 measurement set
uses: actions/cache@v2
uses: actions/cache@v3
env:
cache-name: cache-AS209
with:
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/test-casa.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: package test and docs test
name: test and docs with casa

on: [push, pull_request]

Expand All @@ -8,25 +8,21 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: [3.8]
python-version: [3.8, 3.10]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
pip install --upgrade pip
- name: Install vanilla package
run: |
pip install .
- name: Install test deps
run: |
pip install .[test]
pip install .[test,casa]
- name: Test with pytest
run: |
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: test w/o casatools

on:
- push
- pull_request

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest

0 comments on commit 50706e3

Please sign in to comment.