Skip to content

Commit

Permalink
feature: add github actions support
Browse files Browse the repository at this point in the history
  • Loading branch information
openrijal committed Aug 11, 2023
1 parent 11c8bff commit 049d986
Show file tree
Hide file tree
Showing 9 changed files with 179 additions and 141 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/test-js-ts-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow will install JS/TS dependencies, run tests and lint
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Test JS/TS Submodules

on: [pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v3
- name: Use Node ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install all packages
run: |
cd clients/javascript_client/
npm ci
- name: Run Formatting Checks
run: |
cd clients/javascript_client/
npm run format
- name: Run Lint
run: |
cd clients/javascript_client/
npm run lint
- name: Run Tests
run: |
cd clients/javascript_client/
npm run test
55 changes: 27 additions & 28 deletions .github/workflows/test-python-package.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,41 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Test Submodules
name: Test Python Submodules

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pipenv
run: |
python -m pip install pipenv
- name: Test fma-core on python version ${{matrix.python-version}}
run: |
cd fma-core
make install || exit 1
python -m pipenv run pre-commit run --all-files || exit 1
make test-and-coverage || exit 1
- name: Test fma-django on python version ${{matrix.python-version}}
run: |
cd connectors/django/
make install || exit 1
python -m pipenv run pre-commit run --all-files || exit 1
make test-and-coverage || exit 1
- name: Test fma-connect on python version ${{matrix.python-version}}
run: |
cd clients/python_client
make install || exit 1
python -m pipenv run pre-commit run --all-files || exit 1
make test-and-coverage || exit 1
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pipenv
run: |
python -m pip install pipenv
- name: Test fma-core on python version ${{matrix.python-version}}
run: |
cd fma-core
make install || exit 1
python -m pipenv run pre-commit run --all-files || exit 1
make test-and-coverage || exit 1
- name: Test fma-django on python version ${{matrix.python-version}}
run: |
cd connectors/django/
make install || exit 1
python -m pipenv run pre-commit run --all-files || exit 1
make test-and-coverage || exit 1
- name: Test fma-connect on python version ${{matrix.python-version}}
run: |
cd clients/python_client
make install || exit 1
python -m pipenv run pre-commit run --all-files || exit 1
make test-and-coverage || exit 1
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ examples/client_examples/python_client/dataprofiler_clients/logfile.log
**/dist/*
docs/*
.vscode/*
**/node_modules/*
**/node_modules/*
**/coverage/*
1 change: 1 addition & 0 deletions clients/javascript_client/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
coverage
4 changes: 3 additions & 1 deletion clients/javascript_client/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules/**
node_modules
dist
coverage

# Ignore all JS files, this is only for TS
**/*.js
104 changes: 51 additions & 53 deletions clients/javascript_client/node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 049d986

Please sign in to comment.