update script to Update stubs and run tests #120
Workflow file for this run
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
name: snippet_score | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
# Setting an environment variable with the value of a configuration variable | |
SNIPPET_SCORE: ${{ vars.SNIPPET_SCORE }} | |
GH_TOKEN_VARS: ${{ secrets.GH_TOKEN_VARS }} | |
jobs: | |
test_snippets: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
#---------------------------------------------- | |
- name: Install poetry # poetry is not in the default image | |
run: pipx install poetry==1.3.1 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.x" # Replace with the Python version you're using | |
cache: "poetry" | |
#---------------------------------------------- | |
# install project | |
#---------------------------------------------- | |
- name: Install dependencies for group test | |
run: poetry install --with dev --no-interaction | |
#---------------------------------------------- | |
# stubber clone | |
# repos needed for tests | |
#---------------------------------------------- | |
- name: stubber clone | |
run: poetry run stubber clone --add-stubs | |
- name: test the snippets | |
continue-on-error: true | |
run: | | |
poetry run pytest -m 'snippets' | |
- name: compare and update | |
run: | | |
poetry run python .github/workflows/compare_score.py |