Skip to content

Commit 0d55a67

Browse files
cleaning up github actions
1 parent 8a75b5a commit 0d55a67

File tree

5 files changed

+68
-44
lines changed

5 files changed

+68
-44
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Build and Test JAR
2+
3+
on:
4+
push:
5+
branches: [ "develop" ]
6+
pull_request:
7+
branches: [ "develop" ]
8+
9+
jobs:
10+
build_and_test:
11+
uses: ./.github/workflows/build-and-test.yml
Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
91
name: Build and Test JAR
102

113
on:
@@ -16,26 +8,4 @@ on:
168

179
jobs:
1810
build_and_test:
19-
20-
runs-on: ubuntu-latest
21-
22-
steps:
23-
- uses: actions/checkout@v4
24-
- name: Set up JDK 21
25-
uses: actions/setup-java@v4
26-
with:
27-
java-version: '21'
28-
distribution: 'temurin'
29-
cache: maven
30-
- name: Set up Python 3.11
31-
uses: actions/setup-python@v4
32-
with:
33-
python-version: '3.11'
34-
- name: Build with Maven
35-
run: mvn -B package -Psign-artifacts --file pom.xml
36-
- name: Run Python Unit Tests
37-
run: |
38-
chmod +x build/setup_python_env.sh
39-
chmod +x test/python_unit_tests/setup_unit_test_env.sh
40-
chmod +x test/python_unit_tests/run_python_unit_tests.sh
41-
test/python_unit_tests/run_python_unit_tests.sh
11+
uses: ./.github/workflows/build-and-test.yml
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build and Test (Reusable)
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build_and_test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Set up JDK 21
12+
uses: actions/setup-java@v4
13+
with:
14+
java-version: '21'
15+
distribution: 'temurin'
16+
cache: maven
17+
- name: Set up Python 3.11
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.11'
21+
- name: Build with Maven
22+
run: mvn -B package -Psign-artifacts --file pom.xml
23+
- name: Run Python Unit Tests
24+
run: |
25+
chmod +x test/python_setup/setup_python_env.sh
26+
chmod +x test/python_setup/cleanup_python_env.sh
27+
chmod +x test/python_unit_tests/setup_unit_test_env.sh
28+
chmod +x test/python_unit_tests/run_python_unit_tests.sh
29+
test/python_unit_tests/run_python_unit_tests.sh

.github/workflows/renovate.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,25 @@ on:
1212
jobs:
1313
renovate:
1414
runs-on: ubuntu-latest
15-
# This section is crucial. It grants the GITHUB_TOKEN the necessary
16-
# permissions for Renovate to read repository content and create pull requests.
15+
# Grants the GITHUB_TOKEN the necessary permissions for Renovate to read repository content and create pull requests.
1716
permissions:
1817
contents: write
1918
pull-requests: write
2019
steps:
21-
# Checks out your repository under $GITHUB_WORKSPACE, so your job can access it
20+
# Checks out the repository under $GITHUB_WORKSPACE, so your job can access it
2221
- uses: actions/checkout@v4
23-
2422
# Runs the Renovate GitHub Action
2523
- name: Renovate
2624
# Using a slightly newer version of the action
2725
uses: renovatebot/[email protected]
2826
with:
2927
# The token is required to create pull requests.
30-
# GITHUB_TOKEN is automatically created by Actions and is given
31-
# the permissions defined in the `permissions` block above.
3228
token: ${{ secrets.GITHUB_TOKEN }}
3329
# Specifies the path to your Renovate configuration file.
3430
configurationFile: .github/renovate.json
3531
env:
36-
# Use 'debug' for verbose logging, which is helpful for troubleshooting.
37-
LOG_LEVEL: 'debug'
3832
RENOVATE_REPOSITORIES: ${{ github.repository }} # This tells Renovate to scan the current repo
39-
33+
# Add a build and test job that depends on renovate
34+
build_and_test:
35+
needs: renovate
36+
uses: ./.github/workflows/build-and-test.yml

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Start by cloning the project: `git clone https://github.com/finos/rune-python-ge
3737

3838
Our project runs with Java 21. Make sure that your Maven also uses this version of Java by running `mvn -v`.
3939

40-
To build the project, run `mvn clean install`.
40+
To build the project, run `mvn clean package`.
4141

4242
#### UNIT Testing
4343
Building the project using Maven will run JUNIT-based unit tests. All tests should pass. To run the Python unit tests follow the instructions in [BUILDANDTEST.md](./BUILDANDTEST.md)
@@ -55,11 +55,18 @@ We use [Checkstyle](https://checkstyle.sourceforge.io/) for enforcing good codin
5555
#### Open the project in Eclipse
5656
Go to Import... > Existing Maven Project, select the right folder, click Finish.
5757

58+
### Standalone CLI
59+
The generator includes a standalone CLI which can be invoked to generate Python from a single file or from directory. To invoke the CLI, first build the project and then:
60+
61+
```sh
62+
java -cp target/python-0.0.0.main-SNAPSHOT.jar com.regnosys.rosetta.generator.python.PythonCodeGeneratorCLI
63+
```
64+
5865
### To Generate CDM from Rune
5966

6067
Use this script to generated the Python version of CDM
6168
```sh
62-
build/build_cdm.sh
69+
test/cdm_tests/cdm_setup/build_cdm.sh
6370
```
6471
The script will use the CDM from the branch specified in the file (E.G. master) of the [FINOS Repo](https://github.com/finos/common-domain-model) and generate a wheel in the project directory `target/python-cdm`
6572

@@ -69,6 +76,14 @@ To use a different version of CDM, update CDM_VERSION in the script.
6976

7077
The Roadmap will be aligned to the [Rune-DSL](https://github.com/finos/rune-dsl/) and [CDM](https://github.com/finos/common-domain-model/blob/master/ROADMAP.md) roadmaps.
7178

79+
### Rune-DSL Updates
80+
81+
Renovate will generate a PR when the version of the DSL has been updated at com.regnosys.rosetta:com.regnosys.rosetta. The PR will calrify whether the change succsessfully builds and passes JUNIT and Python unit testing.
82+
83+
Any maintainer can merge changes that successfully build and pass the tests.
84+
85+
Build or testing failures should be escalated to [@plamen-neykov](https://github.com/plamen-neykov) or [@dschwartznyc](https://github.com/dschwartznyc) for remediation.
86+
7287
## Contributing
7388
For any questions, bugs or feature requests please open an [issue](https://github.com/finos/rune-python-generator/issues)
7489
For anything else please send an email to {project mailing list}.
@@ -81,9 +96,11 @@ To submit a contribution:
8196
5. Push to the branch (`git push origin feature/fooBar`)
8297
6. Create a new Pull Request
8398

84-
_NOTE:_ Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the FINOS Clabot tool (or EasyCLA). Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.
99+
_NOTE:_ Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR
100+
who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged
101+
and blocked by the FINOS Clabot tool (or EasyCLA). Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.
85102

86-
Unsure if you are covered under an existing CCLA? Email [email protected]*
103+
If you are unsure if you are covered under an existing CCLA send an email to [email protected]
87104

88105
## Get in touch with the Rune Python Generator Team
89106

0 commit comments

Comments
 (0)