Skip to content

Add CI #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 34 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 4 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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: {}
Expand Down
Loading