Skip to content

Commit 9b8a7e8

Browse files
build: Migrate MedCAT v1 Github Actions (#23)
* build: Migrate MedCAT v1 tutorial action * build: Migrate codeql.yml * build: Regenerate default codeql.yml * build(medcat-v1): Add MedCAT v1 github action * build(medcat-v1): Add MedCAT v1 github action - fix setuptools_scm * build(medcat-v1): Move the production action, disable for now
1 parent fc64b1b commit 9b8a7e8

File tree

6 files changed

+47
-18
lines changed

6 files changed

+47
-18
lines changed

medcat-v1/.github/workflows/codeql.yml renamed to .github/workflows/codeql.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12-
name: "CodeQL"
12+
name: "CodeQL Advanced"
1313

1414
on:
1515
push:
1616
branches: [ "main" ]
1717
pull_request:
1818
branches: [ "main" ]
1919
schedule:
20-
- cron: '36 14 * * 0'
20+
- cron: '19 7 * * 0'
2121

2222
jobs:
2323
analyze:
@@ -28,7 +28,6 @@ jobs:
2828
# - https://gh.io/using-larger-runners (GitHub.com only)
2929
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
3030
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31-
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
3231
permissions:
3332
# required for all workflows
3433
security-events: write
@@ -44,11 +43,13 @@ jobs:
4443
fail-fast: false
4544
matrix:
4645
include:
46+
- language: actions
47+
build-mode: none
4748
- language: javascript-typescript
4849
build-mode: none
4950
- language: python
5051
build-mode: none
51-
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
52+
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
5253
# Use `c-cpp` to analyze code written in C, C++ or both
5354
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
5455
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
@@ -60,6 +61,12 @@ jobs:
6061
- name: Checkout repository
6162
uses: actions/checkout@v4
6263

64+
# Add any setup steps before running the `github/codeql-action/init` action.
65+
# This includes steps like installing compilers or runtimes (`actions/setup-node`
66+
# or others). This is typically only required for manual builds.
67+
# - name: Setup runtime (example)
68+
# uses: actions/setup-example@v1
69+
6370
# Initializes the CodeQL tools for scanning.
6471
- name: Initialize CodeQL
6572
uses: github/codeql-action/init@v3

medcat-v1-tutorials/.github/workflows/main.yml renamed to .github/workflows/medcat-v1-tutorials_main.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
name: build
1+
name: medcat-v1-tutorials - Test
22

33
on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
7+
paths:
8+
- 'medcat-v1/**'
9+
- 'medcat-v1-tutorials/**'
10+
- '.github/workflows/medcat-v1**'
11+
- '.github/workflows/medcat-v1-tutorials**'
12+
defaults:
13+
run:
14+
working-directory: ./medcat-v1-tutorials
815

916
jobs:
1017
main:

medcat-v1/.github/workflows/main.yml renamed to .github/workflows/medcat-v1_main.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
name: build
1+
name: medcat-v1 - build
22

33
on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
8-
7+
paths:
8+
- 'medcat-v1/**'
9+
- '.github/workflows/medcat-v1**'
10+
defaults:
11+
run:
12+
working-directory: ./medcat-v1
913
jobs:
1014
build:
1115

@@ -70,12 +74,13 @@ jobs:
7074
python tests/check_deprecations.py "$VERSION" --next-version --remove-prefix
7175
7276
publish-to-test-pypi:
73-
77+
# Disable pypy publish waiting for TEST_PYPI_API_TOKEN
7478
if: |
75-
github.repository == 'CogStack/MedCAT' &&
79+
github.repository == 'CogStack/cogstack-nlp' &&
7680
github.ref == 'refs/heads/main' &&
7781
github.event_name == 'push' &&
78-
startsWith(github.ref, 'refs/tags') != true
82+
startsWith(github.ref, 'refs/tags') != true &&
83+
false
7984
runs-on: ubuntu-24.04
8085
timeout-minutes: 45
8186
concurrency: publish-to-test-pypi

medcat-v1/.github/workflows/production.yml renamed to .github/workflows/medcat-v1_production.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1-
name: production
1+
# TODO: Fix Medcat V1 Release Actions
2+
# Disabled waiting for designed release process
3+
# Disabled waiting for PYPI_API_TOKEN
4+
name: medcat-v1 - production
25

36
on:
47
push:
5-
branches: [ production, "v[0-9]+.[0-9]+.post" ]
6-
release:
7-
types: [ published , edited ]
8-
8+
branches: [ "medcat-v1/production", "medcat-v1/v[0-9]+.[0-9]+.post" ]
9+
10+
# release:
11+
# types: [ published , edited ]
12+
defaults:
13+
run:
14+
working-directory: ./medcat-v1
915
jobs:
1016
build-n-publish-to-pypi:
17+
1118
runs-on: ubuntu-24.04
1219
concurrency: build-n-publish-to-pypi
13-
if: github.repository == 'CogStack/MedCAT'
20+
if: |
21+
github.repository == 'CogStack/cogstack-nlp' &&
22+
false
1423
1524
steps:
1625
- name: Checkout production
-6 KB
Binary file not shown.

medcat-v1/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ requires = ["setuptools>=42", "setuptools_scm[toml]>=6.2", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.setuptools_scm]
6+
root = "../" # adjust this relative to your package

0 commit comments

Comments
 (0)