Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
5ffc937
DEVOPS-553 :: Review valifn-python coverage configuration (#27)
ricardo-dematos Nov 14, 2022
9875868
Bump numpy from 1.23.4 to 1.23.5 (#29)
dependabot[bot] Nov 23, 2022
a64fa91
Bump pandas from 1.5.1 to 1.5.2 (#30)
dependabot[bot] Nov 24, 2022
9025999
Bump black from 22.10.0 to 22.12.0 (#31)
dependabot[bot] Dec 13, 2022
13b5ea4
Bump martialonline/workflow-status from 3 to 4 (#32)
dependabot[bot] Dec 17, 2022
f90feca
Bump actions/stale from 6 to 7 (#34)
dependabot[bot] Dec 21, 2022
182a68d
DEVOPS-617 :: Stale workflow renamed to Issues
ricardo-dematos Jan 4, 2023
8c7d708
DEVOPS-617 :: Issues workflow fixed
ricardo-dematos Jan 4, 2023
2f580ba
DEVOPS-617 :: Issues workflow updated
ricardo-dematos Jan 4, 2023
21665cc
DEVOPS-617 :: Issues workflow reviewed
ricardo-dematos Jan 5, 2023
793344e
DEVOPS-664 :: Disable "no-else-return" warning in valifn project (#38)
ricardo-dematos Jan 12, 2023
4abf0ee
Bump requests from 2.28.1 to 2.28.2 (#39)
dependabot[bot] Jan 15, 2023
c29d04f
Bump pandas from 1.5.2 to 1.5.3 (#40)
dependabot[bot] Jan 20, 2023
1f8147e
VALI-5456 :: Properly Document Existing Scripting Module Scripts (#41)
ricardo-dematos Jan 20, 2023
9bcc538
README updated
ricardo-dematos Jan 25, 2023
ba571ea
README updated
ricardo-dematos Jan 25, 2023
bbd3112
VALI-5456 :: Properly Document Existing Scripting Module Scripts (#41)
ricardo-dematos Jan 25, 2023
44137fc
README updated
ricardo-dematos Jan 25, 2023
2ddb83a
README updated
ricardo-dematos Jan 26, 2023
de1994d
VALI-5012 :: Use the same 'pint' dependency (#42)
ricardo-dematos Jan 26, 2023
028e7e5
Dockerfile, install git
ricardo-dematos Jan 30, 2023
6403a06
DEVOPS-617 :: Workflows reviewed
ricardo-dematos Jan 30, 2023
aeb9fa2
version bump
ricardo-dematos Jan 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
[run]
omit =
*/commands/*
*/factories/*
*/migrations/*
*/settings/*
*/tests/*
**/commands/**
**/factories/**
**/migrations/**
**/settings/**
**/tests/*
.venv/*
.env/*
*__init__.py
*admin.py
*quantities.py
*renderers.py
*storage.py
*tests.py
*test*.py
*wsgi.py

[report]
sort = -cover
omit =
**/commands/**
**/factories/**
**/migrations/**
**/settings/**
**/tests/*
.venv/*
.env/*
*__init__.py
*admin.py
*quantities.py
*renderers.py
*storage.py
*test*.py
*wsgi.py

[html]
directory = coverage
34 changes: 0 additions & 34 deletions .github/actions/build-docker-image/action.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/actions/get-build-version/action.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/actions/setup-python/action.yml

This file was deleted.

138 changes: 138 additions & 0 deletions .github/workflows/builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
name: 'Builder'

on:

workflow_call:
inputs:
branch-name:
description: 'Branch where the workflow was triggered'
required: true
default: ''
type: string
update-major-version:
description: 'Update major version'
required: false
default: false
type: boolean
update-minor-version:
description: 'Update minor version'
required: false
default: false
type: boolean
update-patch-version:
description: 'Update patch version'
required: false
default: false
type: boolean
pre-release-type:
description: 'Pre-release type (only `alpha`, `release-candidate` or `` are allowed)'
required: false
default: 'NaN'
type: string
outputs:
release:
description: 'The current release version (e.g. `x.y`)'
value: '${{ jobs.build.outputs.release }}'
version:
description: 'The current build version (e.g. `x.y.z(-(alpha|release-candidate)-(epoch))?`)'
value: '${{ jobs.build.outputs.version }}'
pre-release-type:
description: 'The current pre-release type (if defined) (e.g. `alpha`, `release-candidate`, ``)'
value: '${{ jobs.build.outputs.pre-release-type }}'
pre-release-metadata:
description: 'The current pre-release metadata (if defined) (e.g. `alpha-1692107243`, `release-candidate-1692112160`, ``)'
value: '${{ jobs.build.outputs.pre-release-metadata }}'

jobs:

# Build and upload artifacts
build:

outputs:
release: '${{ steps.versioning.outputs.release }}'
version: '${{ steps.versioning.outputs.version }}'
pre-release-type: '${{ steps.versioning.outputs.pre-release-type }}'
pre-release-metadata: '${{ steps.versioning.outputs.pre-release-metadata }}'

runs-on: ubuntu-latest

# Set GITHUB_TOKEN required permissions
permissions:
contents: write
actions: write
packages: write

steps:

- name: 'Set up steps'
id: setup
run: |
echo "repository=$( echo "${{ github.repository }}" )" >> $GITHUB_OUTPUT
echo "repository_owner=$( echo "${{ github.repository_owner }}" )" >> $GITHUB_OUTPUT
echo "repository_name=$( echo "${{ github.event.repository.name }}" )" >> $GITHUB_OUTPUT
echo "branch_name=$( echo "${{ inputs.branch-name }}" )" >> $GITHUB_OUTPUT
echo "branch_ref=$( echo "refs/heads/${{ inputs.branch-name }}" )" >> $GITHUB_OUTPUT
echo "update_major_version=$( echo "${{ inputs.update-major-version }}" )" >> $GITHUB_OUTPUT
echo "update_minor_version=$( echo "${{ inputs.update-minor-version }}" )" >> $GITHUB_OUTPUT
echo "update_patch_version=$( echo "${{ inputs.update-patch-version }}" )" >> $GITHUB_OUTPUT
echo "pre_release_type=$( echo "${{ inputs.pre-release-type }}" )" >> $GITHUB_OUTPUT
echo "pre_release_metadata=$( if [[ ("${{ inputs.pre-release-type }}" == "NaN") ]]; then echo "NaN"; elif [[ ("${{ inputs.pre-release-type }}" == "") ]]; then echo ""; else echo "${{ inputs.pre-release-type }}-$( date +%s )"; fi )" >> $GITHUB_OUTPUT
shell: bash

- name: 'Check out repository'
id: checkout
uses: actions/checkout@v3
with:
ref: '${{ steps.setup.outputs.branch_ref }}'

- name: 'Bump build version'
id: bump-build-version
if: ${{ (inputs.update-major-version == 'true') || (inputs.update-minor-version == 'true') || (inputs.update-patch-version == 'true') || (inputs.pre-release-type != 'NaN') }}
uses: valispace/actions/bump-build-version@master
with:
versioning-file: '__init__.py'
update-major-version: ${{ steps.setup.outputs.update_major_version }}
update-minor-version: ${{ steps.setup.outputs.update_minor_version }}
update-patch-version: ${{ steps.setup.outputs.update_patch_version }}
pre-release-metadata: '${{ steps.setup.outputs.pre_release_metadata }}'

- name: 'Get build version'
id: versioning
uses: valispace/actions/get-build-version@master
with:
versioning-file: '__init__.py'

- name: 'Commit changes'
id: commit-changes
if: ${{ (inputs.update-major-version == 'true') || (inputs.update-minor-version == 'true') || (inputs.update-patch-version == 'true') || (inputs.pre-release-type != 'NaN') }}
uses: valispace/actions/commit-changes@master
with:
protected-branch-token: '${{ secrets.REPO_ADMIN_TOKEN }}'
repository-owner: '${{ steps.setup.outputs.repository_owner }}'
repository-name: '${{ steps.setup.outputs.repository_name }}'
branch-name: '${{ steps.setup.outputs.branch_name }}'
commit-author: 'github_actions'
commit-message: '${{ steps.setup.outputs.repository_name }} build ${{ steps.versioning.outputs.version }}'

- name: 'Build docker image'
id: docker-build-image
uses: valispace/actions/docker-build-image@master
with:
dockerfile: 'Dockerfile'
archive-name: '${{ steps.setup.outputs.repository_name }}-docker.tar.gz'
labels: 'version=${{ steps.versioning.outputs.version }}'
tags: |
${{ steps.setup.outputs.repository }}:${{ steps.versioning.outputs.version }}
${{ steps.setup.outputs.repository }}:latest

- name: 'Push docker image to Docker Hub'
id: docker-push-image
uses: valispace/actions/docker-push-image@master
with:
dockerfile: 'Dockerfile'
registry: 'ghcr.io'
username: '${{ steps.setup.outputs.repository_owner }}'
password: '${{ secrets.GITHUB_TOKEN }}'
labels: 'version=${{ steps.versioning.outputs.version }}'
tags: |
ghcr.io/${{ steps.setup.outputs.repository }}:${{ steps.setup.outputs.branch_name }}
Loading