Skip to content

Fix code snippets

Fix code snippets #259

Workflow file for this run

name: Test package
on:
push:
branches-ignore:
- main
jobs:
changes:
name: Repository changes
runs-on: ubuntu-latest
outputs:
python: ${{ steps.filter.outputs.python }}
js: ${{ steps.filter.outputs.js }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get the last release
id: last_release
uses: cardinalby/git-get-release-action@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
latest: true
prerelease: false
draft: false
- name: Find changes since the last release
uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ steps.last_release.outputs.tag_name }}
filters: |
python:
- 'python/**'
js:
- 'js/**'
python-tests:
needs: [ changes ]
name: Tests Python package
if: needs.changes.outputs.python == 'true'
uses: ./.github/workflows/python_tests.yml
secrets: inherit
js-tests:
needs: [ changes ]
name: Tests JS package
if: needs.changes.outputs.js == 'true'
uses: ./.github/workflows/js_tests.yml
secrets: inherit