diff --git a/.github/fedired/test.yml b/.github/fedired/test.yml new file mode 100644 index 0000000..1b807bc --- /dev/null +++ b/.github/fedired/test.yml @@ -0,0 +1,16 @@ +url: 'http://fedired.local' + +setupPassword: example_password_please_change_this_or_you_will_get_hacked + +port: 61812 + +db: + host: 127.0.0.1 + port: 54312 + db: test-fedired + user: postgres + pass: '' +redis: + host: 127.0.0.1 + port: 56312 +id: aidx \ No newline at end of file diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..27947ea --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,15 @@ +# .github/labeler.yml + +version: 2 + +pull_request: + 'packages/backend/**': + - backend + 'packages/backend-rs/**': + - backend-rust + 'packages/client/**': + - client + 'packages/sw/**': + - service-worker + 'packages/fedired-js/**': + - frontend diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8d604cb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,39 @@ +name: Test (production install and build) + +on: + push: + branches: + - master + - develop + pull_request: + +env: + NODE_ENV: production + +jobs: + production: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.16.0] + + steps: + - uses: actions/checkout@v4.1.1 + with: + submodules: true + - name: Install pnpm + uses: pnpm/action-setup@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4.0.4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - run: corepack enable + - run: pnpm i --no-frozen-lockfile # Cambiado aquĆ­ + - name: Check pnpm-lock.yaml + run: git diff --exit-code pnpm-lock.yaml + - name: Copy Configure + run: cp .github/fedired/test.yml .config/default.yml + - name: Build + run: pnpm build diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..cab313b --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,16 @@ +name: "Pull Request Labeler" +on: + pull_request_target: + branches-ignore: + - 'l10n_develop' + +jobs: + triage: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..2284b93 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test