Skip to content

Commit

Permalink
Add github configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdangerw committed Dec 16, 2021
1 parent 3026891 commit 24e6eb1
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
<!---
A clear and concise description of what the bug is.
-->

**To Reproduce**
<!---
Provide a link to a [Colab Notebook](https://research.google.com/colaboratory/), which reproduces the bug.
-->

**Expected behavior**
<!---
A clear and concise description of what you expected to happen.
-->

**Additional context**
<!---
Add any other context about the problem here.
-->

**Would you like to help us fix it?**
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Custom issue template
about: Describe this issue template's purpose here.
title: ''
labels: ''
assignees: ''

---


28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
<!---
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
-->

**Describe the solution you'd like**
<!---
A clear and concise description of what you want to happen.
-->

**Describe alternatives you've considered**
<!---
A clear and concise description of any alternative solutions or features you've considered.
-->

**Additional context**
<!---
Add any other context or screenshots about the feature request here.
-->
66 changes: 66 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Tests

on:
push:
pull_request:
release:
types: [created]
jobs:
build:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip setuptools
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install tensorflow
pip install -e ".[tests]" --progress-bar off --upgrade
- name: Test with pytest
run: |
pytest --cov=keras_nlp --cov-report xml:coverage.xml
format:
name: Check the code format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip setuptools
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install tensorflow
pip install -e ".[tests]" --progress-bar off --upgrade
- name: Lint
run: bash shell/lint.sh
37 changes: 37 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test TF Nightly

on:
schedule:
- cron: '0 0 * * *'
push:
branches: [ master ]

jobs:
build:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Get pip cache dir
id: pip-cache
run: |
python -m pip install --upgrade pip setuptools
echo "::set-output name=dir::$(pip cache dir)"
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install tf-nightly --progress-bar off --upgrade
pip install -e ".[tests]" --progress-bar off --upgrade
- name: Test with pytest
run: |
pytest --cov=keras_nlp --cov-report xml:coverage.xml

0 comments on commit 24e6eb1

Please sign in to comment.