diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1550432..9ae8db3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,26 +2,49 @@ name: CI on: push: - pull_request: branches: [main] + pull_request: {} jobs: - main: + lints: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: wyvox/action-setup-pnpm@v3 + - run: pnpm lint + + test_success: strategy: matrix: os: - ubuntu-latest - - windows-latest + # - windows-latest - macos-latest - node: - - latest - - lts/* - - 18 runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - uses: wyvox/action-setup-pnpm@v3 - uses: ./ - with: - node-version: ${{ matrix.node }} - - run: pnpm lint:fix + + test_failure: + strategy: + matrix: + os: + - ubuntu-latest + # - windows-latest + - macos-latest + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - run: rm .prettierignore + - uses: ./ + id: self + continue-on-error: true + - if: always() + run: | + if [[ "${{ steps.self.outcome }}" == "failure" ]]; then + echo "Successfully failed" + exit 0; + else + echo "Unsuccessfully failed. Expected failure." + exit 1 + fi diff --git a/action.yml b/action.yml index 4fed2fd..dc3b155 100644 --- a/action.yml +++ b/action.yml @@ -1,7 +1,8 @@ name: Ensure no git diff exists -description: | - Use git diff --exit-code to ensure stability of commands and to reduce flakiness in CI. - If you see an error from this task, please check the command(s) from the previous step(s) and try running them locally. +description: Use git diff --exit-code to ensure stability of commands and to reduce flakiness in CI. +branding: + icon: award + color: green # None inputs: {}