feat: Add path option (#1) #18
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
--- | |
on: [push, pull_request] | |
name: Tests | |
jobs: | |
test-success-default: | |
runs-on: ubuntu-latest | |
name: Test default success | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Create example package-lock.json file | |
run: | | |
echo '{ "lockfileVersion": 2 }' > package-lock.json | |
- name: Run lockfile check action | |
# Use the action in this repository. | |
uses: ./ | |
test-success-path: | |
runs-on: ubuntu-latest | |
name: Test path input | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Create example package-lock.json file | |
run: | | |
mkdir -p src | |
echo '{ "lockfileVersion": 2 }' > src/package-lock.json | |
- name: Run lockfile check action | |
# Use the action in this repository. | |
uses: ./ | |
with: | |
path: src/package-lock.json | |
test-success-version: | |
runs-on: ubuntu-latest | |
name: Test version input | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Create example package-lock.json file | |
run: | | |
echo '{ "lockfileVersion": 1 }' > package-lock.json | |
- name: Run lockfile check action | |
# Use the action in this repository. | |
uses: ./ | |
with: | |
version: 1 | |
# test-fail-missing-file: | |
# | |
# test-fail-default: | |
# | |
# test-fail-version: |