Skip to content

Commit

Permalink
Snapshots updating workflow. (#219)
Browse files Browse the repository at this point in the history
* Snapshots updating workflow.

* Testing workflow in branch.

* Fix python version.

* Testing UI changes.

* Updating snapshots.

* Ussing latest version of action.

* Updating snapshots.

* Revert "Testing workflow in branch."

This reverts commit 363ef70.

* Add cache.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
RobinTail and github-actions[bot] authored Sep 23, 2023
1 parent 7c7b8d5 commit ab4f333
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/snapshot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Snapshot Update
on: workflow_dispatch

jobs:
snapshotUpdate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fregante/setup-git-user@v2
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Get pip cache dir
id: pipCache
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache pip modules
uses: actions/cache@v3
with:
path: ${{ steps.pipCache.outputs.dir }}
key: ${{ runner.os }}-build-cache-pip-python-3.10-octoprint-1.9
- name: Install OctoPrint
run: pip install octoprint~=1.9.0
- name: Install OctoRelay
run: pip install -e .
- name: Prepare testing environment
run: pip install coverage pylint snapshottest
- name: Remove snapshots
run: rm tests/snapshots/snap*
- name: Make new snapshots
working-directory: tests
run: python -m coverage run -m unittest test*.py
- name: Commit changes
run: |
git add tests/snapshots
git commit -m "Updating snapshots."
- name: Push changes
run: git push

0 comments on commit ab4f333

Please sign in to comment.