-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update github.com/coinbase/waas-client-library-go
* right/master: Release v1.0.0 (#8) Release v1.0.0 (#7) Bump cryptography from 41.0.5 to 41.0.6 (#6) Release v1.0.0 (#5) Cleanup and add Unit tests (#4) inital commit fix (#2) initial commit
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Build and Test | ||
|
||
on: [push] | ||
|
||
jobs: | ||
format-code: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies and format code | ||
run: | | ||
sudo apt-get install -y make | ||
pip3 install black isort | ||
make format | ||
if git diff --quiet; then | ||
echo "No code formatting changes detected." | ||
else | ||
echo "Code formatting changes detected. Please run 'make format' locally and commit the changes." | ||
git diff --exit-code | ||
exit 1 | ||
fi | ||
run-tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python environment | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies and run tests | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r test_requirements.txt | ||
python -m unittest discover -v |