Skip to content

ci: SHA-pin actions/checkout to v4.3.1 #18

ci: SHA-pin actions/checkout to v4.3.1

ci: SHA-pin actions/checkout to v4.3.1 #18

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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- 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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- 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@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: Test with drivers
uses: ./
with:
drivers: 'sqlite'
test-cache:
name: Test caching
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- name: First run
id: first
uses: ./
- name: Remove dbc and cached files
run: |
DBC_PATH=$(command -v dbc)
if [ -n "$DBC_PATH" ]; then
rm -f "$DBC_PATH"
fi
# Remove Linux-specific cached paths to 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