Skip to content

Use whisper's medium model (#40) #193

Use whisper's medium model (#40)

Use whisper's medium model (#40) #193

name: lint-test-build-push
on:
push:
paths-ignore:
- '*.md'
- '.github/**'
- 'ci/**'
permissions:
contents: read
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: check valid yml
run: yq . ./examples/*/scyllaridae.yml
- name: check valid sh
run: shellcheck examples/*/*.sh
- uses: actions/setup-go@v5
with:
go-version: '>=1.22.2'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.54
- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...
- name: Put fixture in place
run: cp scyllaridae.example.yml scyllaridae.yml
- name: Test with the Go CLI
run: go test -v -race ./...
build-push-base:
needs: [lint-test]
uses: ./.github/workflows/build-push.yml
with:
dockerFile: Dockerfile
permissions:
contents: read
id-token: write
secrets: inherit
find-images:
needs: [build-push-base]
name: Find docker images needing built
runs-on: ubuntu-latest
outputs:
dockerFiles: ${{ steps.images.outputs.dockerFiles }}
steps:
- uses: actions/checkout@v4
- name: Find docker files
id: images
run: |
dockerFiles=$(find examples -name Dockerfile | grep -v coverpage | jq -c --raw-input --slurp 'split("\n")| .[0:-1]')
echo "dockerFiles=$dockerFiles" >> $GITHUB_OUTPUT
env:
GITHUB_REF: ${{ github.ref }}
build-push:
needs: [find-images]
strategy:
matrix:
dockerFile: ${{ fromJson(needs.find-images.outputs.dockerFiles )}}
uses: ./.github/workflows/build-push.yml
with:
dockerFile: ${{ matrix.dockerFile }}
permissions:
contents: read
id-token: write
secrets: inherit
build-push-dependencies:
needs: [build-push]
strategy:
matrix:
dockerFile: ["examples/coverpage/Dockerfile"]
uses: ./.github/workflows/build-push.yml
with:
dockerFile: ${{ matrix.dockerFile }}
permissions:
contents: read
id-token: write
secrets: inherit
integration-tests:
needs: [build-push-dependencies]
name: Integration tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Extract branch name as docker tag
shell: bash
run: |-
BRANCH=$(echo "${GITHUB_REF#refs/heads/}" | sed 's/[^a-zA-Z0-9._-]//g' | awk '{print substr($0, length($0)-120)}')
echo "branch=$BRANCH" >> $GITHUB_OUTPUT
id: extract_branch
- name: Run tests
id: images
run: ./ci/run.sh
env:
DOCKER_REPOSITORY_BASE: us-docker.pkg.dev/${{ secrets.GCLOUD_PROJECT }}/public/scyllaridae
DOCKER_TAG: ${{steps.extract_branch.outputs.branch}}