fix download urls #3
This file contains hidden or 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: 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: 'v1.0.0' | |
| - name: Verify version | |
| run: | | |
| VERSION=$(dbc version) | |
| echo "Installed version: $VERSION" | |
| echo "$VERSION" | grep -q "v1.0.0" || (echo "Expected v1.0.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 |