This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #5 from YuGiOhBot3000/chore/migrate-to-github-actions
Chore: Migrate to Github Actions
- Loading branch information
Showing
13 changed files
with
131 additions
and
66 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,74 @@ | ||
name: CD | ||
|
||
on: | ||
push: | ||
branches: | ||
master | ||
|
||
jobs: | ||
build: | ||
env: | ||
PYTHONPATH: yugiohbot | ||
CLOUDSDK_CORE_DISABLE_PROMPTS: 1 | ||
ACCESS_TOKEN: ${{ secrets.FACEBOOK_ACCESS_TOKEN }} | ||
PAGE_ID: ${{ secrets.FACEBOOK_PAGE_ID }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- uses: hashicorp/setup-terraform@v1 | ||
- run: terraform --version | ||
|
||
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master | ||
with: | ||
service_account_email: ${{ secrets.GCP_EMAIL }} | ||
service_account_key: ${{ secrets.GCP_SA_KEY }} | ||
project_id: ${{ secrets.GCP_PROJECT_ID }} | ||
export_default_credentials: true | ||
|
||
- name: Install GCP Components | ||
run: | | ||
gcloud info | ||
gcloud --quiet components install beta | ||
gcloud --quiet components update | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r yugiohbot/requirements.txt | ||
pip install pytest-cov codecov pandas | ||
- name: Download NLTK | ||
run: | | ||
python -m nltk.downloader punkt averaged_perceptron_tagger wordnet | ||
- name: Create Data | ||
run: | | ||
python -c "import data; data.utilities.import_from_api()" | ||
python -c "import data; data.utilities.label_effects()" | ||
python -c "import data; data.utilities.label_flavour_text()" | ||
mkdir -p yugiohbot/resources | ||
cp cards_api.csv yugiohbot/resources/ | ||
cp effect_order.csv yugiohbot/resources/ | ||
cp flavour_list.csv yugiohbot/resources/ | ||
- name: Run Tests | ||
run: pytest --cov=./ | ||
|
||
- name: Report coverage | ||
run: codecov | ||
|
||
- name: Setup Deployment | ||
run: | | ||
mkdir -p deployment/function/nltk_data | ||
cp -a ~/nltk_data/. deployment/function/nltk_data/ | ||
cp -a yugiohbot/. deployment/function/ | ||
chmod +x ./deployment/deploy.sh | ||
- name: Run Deployment | ||
run: deployment/deploy.sh |
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,44 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
env: | ||
PYTHONPATH: yugiohbot | ||
ACCESS_TOKEN: ${{ secrets.FACEBOOK_ACCESS_TOKEN }} | ||
PAGE_ID: ${{ secrets.FACEBOOK_PAGE_ID }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r yugiohbot/requirements.txt | ||
pip install pytest-cov codecov pandas | ||
- name: Download NLTK | ||
run: | | ||
python -m nltk.downloader punkt averaged_perceptron_tagger wordnet | ||
- name: Create Data | ||
run: | | ||
python -c "import data; data.utilities.import_from_api()" | ||
python -c "import data; data.utilities.label_effects()" | ||
python -c "import data; data.utilities.label_flavour_text()" | ||
mkdir -p yugiohbot/resources | ||
cp cards_api.csv yugiohbot/resources/ | ||
cp effect_order.csv yugiohbot/resources/ | ||
cp flavour_list.csv yugiohbot/resources/ | ||
- name: Run Tests | ||
run: pytest --cov=./ | ||
|
||
- name: Report coverage | ||
run: codecov |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
terraform { | ||
required_providers { | ||
archive = { | ||
source = "hashicorp/archive" | ||
} | ||
google = { | ||
source = "hashicorp/google" | ||
} | ||
} | ||
required_version = ">= 0.13" | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
|
@@ -3,4 +3,5 @@ textblob | |
pandas | ||
requests | ||
textgenrnn | ||
tensorflow==1.14 | ||
tensorflow==2.2.0 | ||
keras==2.2.0 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.