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: CI | |
| # on: | |
| # push: | |
| # branches: [main, develop] | |
| # pull_request: | |
| # branches: [main] | |
| # jobs: | |
| # test: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # - name: Setup Node.js | |
| # uses: actions/setup-node@v4 | |
| # with: | |
| # node-version: '20' | |
| # cache: 'npm' | |
| # - name: Install dependencies | |
| # run: npm ci | |
| # - name: Run linter | |
| # run: npm run lint | |
| # - name: Build | |
| # run: npm run build | |
| # - name: Check if dist/ is up to date | |
| # run: | | |
| # if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then | |
| # echo "Detected uncommitted changes after build. See status below:" | |
| # git diff | |
| # exit 1 | |
| # fi | |
| # test-action: | |
| # runs-on: ubuntu-latest | |
| # needs: test | |
| # steps: | |
| # - name: Checkout | |
| # uses: actions/checkout@v4 | |
| # - name: Test Action | |
| # id: test | |
| # uses: ./ | |
| # with: | |
| # id: ci-test | |
| # initial_number: 1 | |
| # gh_repo: ${{ github.repository }} | |
| # - name: Verify Output | |
| # run: | | |
| # echo "Build number: ${{ steps.test.outputs.build_number }}" | |
| # echo "Previous number: ${{ steps.test.outputs.previous_number }}" | |
| # # Verify that build_number is a number and greater than 0 | |
| # if ! [[ "${{ steps.test.outputs.build_number }}" =~ ^[0-9]+$ ]]; then | |
| # echo "Error: build_number is not a valid number" | |
| # exit 1 | |
| # fi | |
| # if [ "${{ steps.test.outputs.build_number }}" -le 0 ]; then | |
| # echo "Error: build_number should be greater than 0" | |
| # exit 1 | |
| # fi | |
| # echo "✅ Action test passed!" |