feat: generate list of supported models #3
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: Testing using bats | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test-bats: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Bats | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y bats | |
- name: Run Bats tests | |
run: bats test/*.bats # Or the path to your Bats tests | |
- name: Generate models.json | |
run: | | |
models=$(find parsers -maxdepth 1 -name "*.sh" -printf '\t"%f",\n' | sed 's/\.sh",/,",/g') | |
models="${models%,*}" # Remove the trailing comma and newline | |
echo "[\n$models\n]" > models.json | |
cat models.json |