-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from davidatbu/feature/try-setting-up-CI
Create main.yml for continuous integration
- Loading branch information
Showing
3 changed files
with
56 additions
and
4 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,56 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: unittest-CI | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
unittest: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8] | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Redis | ||
run: sudo apt-get install redis | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Cd into checked out copy | ||
run: cd $GITHUB_WORKSPACE | ||
|
||
- name: Download and extract mallet | ||
run: | | ||
wget http://mallet.cs.umass.edu/dist/mallet-2.0.8.tar.gz -O $HOME/mallet-2.0.8.tar.gz | ||
mkdir $HOME/mallet | ||
tar -xvf ~/mallet-2.0.8.tar.gz --one-top-level=$HOME/mallet | ||
- name: Install Python libraries | ||
run: python -m pip install -r backend/requirements_no_gpu.txt | ||
|
||
- name: Download nltk resources | ||
run: python -m nltk.downloader stopwords wordnet | ||
|
||
- name: Set the MALLET_BIN_DIRECTORY env variable | ||
run: echo ::set-env name=MALLET_BIN_DIRECTORY::$HOME/mallet/mallet-2.0.8/bin | ||
|
||
- name: Run unittesting | ||
run: python -m unittest | ||
working-directory: backend/ |
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
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