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

update workflow to run in PRs #77

Open
wants to merge 4 commits into
base: v1.0.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
23 changes: 4 additions & 19 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ jobs:
ruff check .
- name: Render makita templates
run: |
asreview makita template basic -p basic -d .github/workflows/test_data/ --classifier nb --feature_extractor tfidf --query_strategy max --n_runs 1 --init_seed 1 --model_seed 2 --skip_wordclouds --overwrite --instances_per_query 2 --stop_if min --balance_strategy double | tee output_basic.txt
grep -q "ERROR" output_basic.txt && exit 1 || true
asreview makita template arfi -p arfi -d .github/workflows/test_data/ | tee output_arfi.txt
grep -q "ERROR" output_arfi.txt && exit 1 || true
asreview makita template prior -p prior -d .github/workflows/test_data/ | tee output_prior.txt
grep -q "ERROR" output_prior.txt && exit 1 || true
asreview makita template multimodel -p multimodel -d .github/workflows/test_data/ | tee output_multimodel.txt
grep -q "ERROR" output_multimodel.txt && exit 1 || true
asreview makita template basic -p basic -d .github/workflows/test_data/ --classifier nb --feature_extractor tfidf --query_strategy max --n_runs 1 --init_seed 1 --model_seed 2 --skip_wordclouds --overwrite --instances_per_query 2 --stop_if min --balance_strategy double || exit 1
asreview makita template arfi -p arfi -d .github/workflows/test_data/ || exit 1
asreview makita template prior -p prior -d .github/workflows/test_data/ || exit 1
asreview makita template multimodel -p multimodel -d .github/workflows/test_data/ || exit 1
- name: Render makita scripts
run: |
asreview makita add-script --all -o ./tmp/scripts | tee output_scripts.txt
Expand All @@ -55,14 +51,3 @@ jobs:
scitree
sh jobs.sh
scitree
- name: Upload output files
if: always()
uses: actions/upload-artifact@v3
with:
name: output-files
path: |
output_basic.txt
output_arfi.txt
output_prior.txt
output_multimodel.txt
output_scripts.txt
14 changes: 8 additions & 6 deletions .github/workflows/create-examples.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Update Examples

on:
push:
branches:
- v.1.0.x
- main
pull_request:
types:
- synchronize
- opened

jobs:
update-examples:
Expand All @@ -13,7 +13,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v5
Expand Down Expand Up @@ -43,14 +43,16 @@ jobs:

# Check for changes, commit, and push
- name: Commit and push changes if any
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if ! git diff --quiet; then
echo "Changes detected. Committing and pushing."
git add -A
git commit -m "Update examples"
git push
git push origin HEAD:${{ github.head_ref }}
else
echo "No changes detected. Skipping commit and push."
fi
Loading