Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pytest in GitHub Actions #9

Merged
merged 25 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
921998d
Add automated pytest with GitHub Actions and fix egrid test
jpfleischer Sep 19, 2024
0d6e434
Merge branch 'master' of https://github.com/JGreenlee/e-mission-commo…
jpfleischer Sep 19, 2024
22a9c18
Remove redundant GitHub Actions jobs
jpfleischer Sep 19, 2024
8633c2c
Add jest job
jpfleischer Sep 20, 2024
8d0bcc9
Fix npm test
jpfleischer Sep 20, 2024
fd71135
Fix jest
jpfleischer Sep 20, 2024
cd8250a
Fix babel and jest
jpfleischer Sep 20, 2024
8ce82d2
Remove .babelrc
jpfleischer Sep 20, 2024
65820a6
Try to see the exception in github actions
jpfleischer Sep 20, 2024
9ff5581
Debug no fetch
jpfleischer Sep 20, 2024
4676309
Reset util.js
jpfleischer Sep 20, 2024
2c1698d
Update emcommon.metrics.footprint.util.js
jpfleischer Sep 20, 2024
85ad3ca
Fix end of line
jpfleischer Sep 20, 2024
400431a
Simplify workflow jobs
jpfleischer Sep 20, 2024
f0c6af9
Add miniconda
jpfleischer Sep 20, 2024
e880ad8
Debug
jpfleischer Sep 20, 2024
1f17500
Add architecture to platform
jpfleischer Sep 20, 2024
60ff612
Elaborate on prerequisites for README
jpfleischer Sep 20, 2024
462e5d6
Simplify workflow yaml
jpfleischer Sep 20, 2024
37488fd
Merge branch 'master' of https://github.com/JGreenlee/e-mission-commo…
JGreenlee Oct 23, 2024
27d9999
remove unneeded files/packages
JGreenlee Oct 23, 2024
dc5e097
Merge branch 'master' of https://github.com/JGreenlee/e-mission-commo…
JGreenlee Oct 23, 2024
4a05a62
Revert "remove unit-tests.yml experiment"
JGreenlee Oct 23, 2024
4316185
update README, remove unneeded notes, add GH Actions section
JGreenlee Oct 23, 2024
9ef8349
make all bin/*.sh scripts executable
JGreenlee Oct 23, 2024
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
48 changes: 48 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# taken from https://github.com/e-mission/e-mission-server/blob/master/.github/workflows/test-with-manual-install.yml

name: unit-tests

# Controls when the action will run. Triggers the workflow on push or pull request
on:
push:
pull_request:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
test-pytest:
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Run setup.sh
shell: bash -l {0}
run: |
source bin/setup.sh

- name: Run pytest
shell: bash -l {0}
run: |
source bin/run_pytest.sh

test-jest:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'

- name: Run setup.sh
shell: bash -l {0}
run: |
source bin/setup.sh

- name: Run jest tests
shell: bash -l {0}
run: |
source bin/run_jest.sh
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This repository uses the [Transcrypt](https://www.transcrypt.org/) library to co

## Setup

```
```bash
. bin/setup.sh
```

Expand Down Expand Up @@ -126,3 +126,7 @@ There may be testing scenarios that must significantly diverge between Python an
```bash
. bin/run_jest.sh
```

### GitHub Actions

The unit tests also run via an Actions workflow, which executes both `run_pytest.sh` and `run_jest.sh` on each commit or PR to `master`.
Empty file modified bin/run_pytest.sh
100644 → 100755
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no diff here so I'm guessing you just made it executable, which is good

Empty file.
Loading