Skip to content

fix: update test to expect current version v0.2.0 #4

fix: update test to expect current version v0.2.0

fix: update test to expect current version v0.2.0 #4

Workflow file for this run

name: Test Action
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
test-basic:
name: Test basic installation
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Test action
uses: ./
with:
version: 'latest'
- name: Verify installation
shell: bash
run: |
dbc --version
command -v dbc || where dbc
test-with-version:
name: Test with specific version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test action with version
uses: ./
with:
version: 'v0.2.0'
- name: Verify version
run: |
VERSION=$(dbc --version)
echo "Installed version: $VERSION"
echo "$VERSION" | grep -q "v0.2.0" || (echo "Expected v0.2.0 but got $VERSION" && exit 1)
test-with-drivers:
name: Test driver installation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test with drivers
uses: ./
with:
drivers: 'sqlite'
test-cache:
name: Test caching
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: First run
id: first
uses: ./
- name: Remove dbc and cached files
run: |
DBC_PATH=$(which dbc)
rm -f "$DBC_PATH"
# Remove all potential cached paths to properly test cache restoration
rm -rf ~/.local/bin/dbc ~/.local/share/dbc ~/.config/dbc
- name: Second run (should restore from cache)
id: second
uses: ./
- name: Verify cache was used
run: |
if [ "${{ steps.second.outputs.cache-hit }}" != "true" ]; then
echo "Cache was not used!"
exit 1
fi