Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 0 additions & 23 deletions .github/workflows/automated-ci.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/build-binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
build:
runs-on: ${{ inputs.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
id: pysetup
with:
python-version: "3.12"
Expand All @@ -35,7 +35,7 @@ jobs:
if: runner.os == 'Windows'
run: pyinstaller --onedir --contents-directory "." core.py --icon=resources/assets/CORE_logo_sm.ico --dist ./dist/output/${{ inputs.name }} --collect-submodules pyreadstat --add-data="$env:pythonLocation\Lib\site-packages\xmlschema\schemas;xmlschema/schemas" --hidden-import numpy --hidden-import numpy.core._methods --hidden-import numpy.lib.format --add-data="resources/cache;resources/cache" --add-data="resources/templates;resources/templates" --add-data="resources/schema;resources/schema" --add-data="resources/datasets;resources/datasets" --add-data="resources/jsonata;resources/jsonata"
- name: Archive Binary
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: ${{ inputs.name }}
path: dist/output/${{ inputs.name }}/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ jobs:
custom-executable-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
repository: cdisc-org/cdisc-rules-engine
ref: main
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
mv core cdisc-core-$(date +%Y%m%d)
echo "Executable ready: $(ls cdisc-core-*)"
- name: Upload Artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: cdisc-core-ubuntu-22.04
path: dist/output/core-ubuntu-22.04/core/
Expand All @@ -62,12 +62,12 @@ jobs:
# custom-executable-build-windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/checkout@v6
# with:
# repository: cdisc-org/cdisc-rules-engine
# ref: main
# - name: Set up Python
# uses: actions/setup-python@v5
# uses: actions/setup-python@v6
# with:
# python-version: "3.12"
# - name: Install dependencies
Expand All @@ -91,7 +91,7 @@ jobs:
# Rename-Item core.exe "cdisc-core-$date.exe"
# Write-Output "Executable ready: $(Get-ChildItem cdisc-core-*)"
# - name: Upload Artifact
# uses: actions/upload-artifact@v4
# uses: actions/upload-artifact@v6
# with:
# name: cdisc-core-windows
# path: dist/output/core-windows/core/
Expand All @@ -106,12 +106,12 @@ jobs:
# custom-executable-build-macos:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/checkout@v6
# with:
# repository: cdisc-org/cdisc-rules-engine
# ref: main
# - name: Set up Python
# uses: actions/setup-python@v5
# uses: actions/setup-python@v6
# with:
# python-version: "3.12"
# - name: Install dependencies
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
# mv core cdisc-core-$(date +%Y%m%d)
# echo "Executable ready: $(ls cdisc-core-*)"
# - name: Upload Artifact
# uses: actions/upload-artifact@v4
# uses: actions/upload-artifact@v6
# with:
# name: cdisc-core-macos
# path: dist/output/core-macos/core/
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
name: Deploy Rule Tester Endpoint

on:
workflow_call:
inputs:
environment:
required: true
type: string

workflow_dispatch:
inputs:
environment:
required: true
default: DEV
type: environment

pull_request:
push:
branches:
- main

permissions:
contents: read

env:
creds: '{"clientId":"${{ vars.AZURE_CLIENT_ID }}","clientSecret":"${{ secrets.AZURE_CLIENT_SECRET }}","subscriptionId":"${{ vars.AZURE_SUBSCRIPTION_ID }}","tenantId":"${{ vars.AZURE_TENANT_ID }}"}'
functionAppName: cdisc-library-conformance-rules-generator-dev
Expand All @@ -26,9 +23,9 @@ env:
jobs:
deploy_rule_tester:
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'PROD' }}
environment: ${{ github.event_name == 'pull_request' && 'DEV' || inputs.environment || 'PROD' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: azure/login@v2
with:
creds: ${{ env.creds }}
Expand All @@ -38,7 +35,6 @@ jobs:
app-name: ${{ env.functionAppName }}
mask-inputs: false
app-settings-json: '{"WEBSITE_ENABLE_SYNC_UPDATE_SITE": "1"}' # wait for this step to complete before the webapps-deploy step

general-settings-json: '{"linuxFxVersion": "PYTHON|${{ env.PYTHON_VERSION }}"}'
slot-name: ${{ vars.AZURE_WEBAPP_SLOT }}

Expand All @@ -47,3 +43,9 @@ jobs:
with:
app-name: ${{ env.functionAppName }}
slot-name: ${{ vars.AZURE_WEBAPP_SLOT }}

test_rule_editor_preview:
needs: deploy_rule_tester
uses: ./.github/workflows/test-rule-editor-preview.yml
secrets: inherit
if: contains(fromJSON('["push", "pull_request"]'), github.event_name)
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
ref: ${{ needs.check-if-latest.outputs.version }}

Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/lint-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Check Lint and Format
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions:
contents: read

jobs:
get_changed_files:
runs-on: ubuntu-latest
outputs:
py: ${{ steps.changes.outputs.py_all_changed_files }}
pretty: ${{ steps.changes.outputs.pretty_all_changed_files }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Get changed files
id: changes
uses: tj-actions/changed-files@7dee1b0c1557f278e5c7dc244927139d78c0e22a # v47.0.4
with:
files_yaml: |
py:
- '**.py'
pretty:
- '**.json'
- '**.md'
- '**.yaml'
- '**.yml'
separator: " "

check_python_files:
runs-on: ubuntu-latest
needs: get_changed_files
# only run if there are changed files
if: ${{needs.get_changed_files.outputs.py}}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install linters
run: |
pip install black flake8 -c requirements-dev.txt
- name: Run flake8
run: |
flake8 ${{needs.get_changed_files.outputs.py}} --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 ${{needs.get_changed_files.outputs.py}} --ignore E203,W503 --count --statistics
- name: Run black
run: |
black --check ${{needs.get_changed_files.outputs.py}}

check_prettier_files:
runs-on: ubuntu-latest
needs: get_changed_files
# only run if there are changed files
if: ${{needs.get_changed_files.outputs.pretty}}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
- name: Run prettier
run: |
npm i prettier
npx prettier --check ${{needs.get_changed_files.outputs.pretty}}
44 changes: 0 additions & 44 deletions .github/workflows/lint_format.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/prerelease-update-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key
# git bash: ssh-keygen -t ed25519 -C "github-actions@cdisc.org"
Expand All @@ -18,7 +18,7 @@ jobs:
ssh-key: ${{ secrets.GH_ACTION_PRIVATE_KEY }}

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prerelease-update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
# https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key
# git bash: ssh-keygen -t ed25519 -C "github-actions@cdisc.org"
Expand All @@ -27,7 +27,7 @@ jobs:
ssh-key: ${{ secrets.GH_ACTION_PRIVATE_KEY }}

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.12"

Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Create release zip files
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
with:
name: core-ubuntu-22.04-tar
- name: Upload Ubuntu 22.04 tar.gz
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: core-ubuntu-22.04-tarball
path: core-ubuntu-22.04.tar.gz
Expand All @@ -78,7 +78,7 @@ jobs:

# Upload zips as artifact for the PyPI job
- name: Upload Release Assets for PyPI
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v6
with:
name: release-artifacts
path: |
Expand All @@ -94,9 +94,9 @@ jobs:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
Expand All @@ -118,7 +118,7 @@ jobs:

build-and-push-docker:
needs: [create-release-assets, deploy-PyPi]
uses: ./.github/workflows/docker_release.yml
uses: ./.github/workflows/docker-release.yml
with:
version: ${{ github.event.release.tag_name }}
secrets: inherit
Loading
Loading