Skip to content

Commit

Permalink
Merge pull request #760 from askap-vast/release-v1.1.0
Browse files Browse the repository at this point in the history
v1.1.0 Release
  • Loading branch information
ddobie authored Oct 13, 2024
2 parents f78d38e + 59d5e54 commit 6eed37d
Show file tree
Hide file tree
Showing 188 changed files with 18,708 additions and 9,831 deletions.
2 changes: 1 addition & 1 deletion .github/actions/create-dev-database/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
runs:
using: "composite"
steps:
- run: docker-compose up -d
- run: docker compose up -d
working-directory: ${{ github.action_path }}
shell: bash
env:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
name: ci docs
name: ci docs dev

# a merged PR will trigger a push on master so merging to master is
# a merged PR will trigger a push on dev so merging to dev is
# included in the event below
on:
push:
branches:
- master
- dev

jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.fork == false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: Gr1N/setup-poetry@v4
python-version: 3.9
- uses: Gr1N/setup-poetry@v9
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential libpq-dev libgraphviz-dev
- name: Cache Python dependencies
Expand All @@ -27,5 +27,9 @@ jobs:
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install python dependencies
run: poetry install
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Build and deploy docs
run: poetry run mkdocs gh-deploy -m 'github action deployment' --force
run: poetry run mike deploy --push dev
36 changes: 36 additions & 0 deletions .github/workflows/ci-docs-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: ci docs release

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: Gr1N/setup-poetry@v9
- name: Set release notes tag
run: |
export RELEASE_TAG_VERSION=${{ github.event.release.tag_name }}
echo "RELEASE_TAG_VERSION=${RELEASE_TAG_VERSION:1}" >> $GITHUB_ENV
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential libpq-dev libgraphviz-dev
- name: Cache Python dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
- name: Install python dependencies
run: poetry install
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Build and deploy docs
run: poetry run mike deploy --push --update-aliases ${RELEASE_TAG_VERSION} latest
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: lint

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: ricardochaves/[email protected]
with:
use-pylint: false
use-pycodestyle: false
use-flake8: true
use-black: false
use-mypy: false
use-isort: false
extra-pylint-options: ""
extra-pycodestyle-options: ""
extra-flake8-options: "--select=W291,W292,F401"
# flake8 options being used:
# - W291 trailing whitespace
# - W292 no newline at end of file
# - F401 module imported but unused
extra-black-options: ""
extra-mypy-options: ""
extra-isort-options: ""
113 changes: 67 additions & 46 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,67 +3,88 @@ name: test-suite
on: [pull_request]

env:
db_password: 'postgres'
db_port: '5432'
db_password: "postgres"
db_port: "5432"

jobs:
test:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python_version: ['3.7.5', '3.8.7', '3.9.1']
python_version: ["3.8.12", "3.9.10", "3.10"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Create dev database
uses: ./.github/actions/create-dev-database
with:
db_password: ${{ env.db_password }}
db_port: ${{ env.db_port }}
- name: Create dev database
uses: ./.github/actions/create-dev-database
with:
db_password: ${{ env.db_password }}
db_port: ${{ env.db_port }}

- name: Install dependencies
run: sudo apt-get install -y libpq-dev libgraphviz-dev
- name: Install dependencies
run: sudo apt-get install -y libpq-dev libgraphviz-dev

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}

- uses: actions/setup-node@v2
with:
node-version: '12'
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"

- uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true
- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}

- name: Set up frontend assets and install python dependencies
run: |
npm ci
npm start
pip install .
- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'

- run: poetry install --no-interaction

- uses: actions/setup-node@v4
with:
node-version: "12"

- name: Set DATABASE_URL (using ansible)
run: >
cp webinterface/.env.template webinterface/.env &&
ansible localhost
-m lineinfile
-a "
path=webinterface/.env
regex=^DATABASE_URL
line='DATABASE_URL=psql://vast:vastpsw@localhost:${{ env.db_port }}/vastdb'
"
- name: Set up frontend assets
run: |
npm ci
npm start
- name: Create database user and database name
run: >
python ./init-tools/init-db.py
localhost ${{ env.db_port }}
postgres ${{ env.db_password }}
vast vastpsw vastdb
- name: Set DATABASE_URL (using ansible)
run: >
cp webinterface/.env.template webinterface/.env &&
ansible localhost
-m lineinfile
-a "
path=webinterface/.env
regex=^DATABASE_URL
line='DATABASE_URL=psql://vast:vastpsw@localhost:${{ env.db_port }}/vastdb'
"
- name: Make relevant directories
run: mkdir pipeline-runs
- name: Create database user and database name
run: >
poetry run python ./init-tools/init-db.py
localhost ${{ env.db_port }}
postgres ${{ env.db_password }}
vast vastpsw vastdb
- name: Download regression test data
run: bash -e ./download.sh
working-directory: ./vast_pipeline/tests/regression-data
- name: Make relevant directories
run: mkdir pipeline-runs

- name: Run tests
run: ./manage.py test
- name: Download regression test data
run: bash -e ./download.sh
working-directory: ./vast_pipeline/tests/regression-data

- name: Run tests
run: poetry run python manage.py test
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ docker/
.dockerignore
.idea/
mypy.ini

# mac specific
.DS_store
Loading

0 comments on commit 6eed37d

Please sign in to comment.