From e252bc89c3385175191f6547acb5c9db2fc98d55 Mon Sep 17 00:00:00 2001 From: srnovus Date: Wed, 30 Oct 2024 15:16:10 -0600 Subject: [PATCH] update ci --- .github/labeler.yml | 15 ------------ .github/workflows/build_memory.yml | 23 ++++++++++++++++++ .github/workflows/labeler.yml | 16 ------------- .github/workflows/nodejs.yml | 38 ++++++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 31 deletions(-) delete mode 100644 .github/labeler.yml create mode 100644 .github/workflows/build_memory.yml delete mode 100644 .github/workflows/labeler.yml create mode 100644 .github/workflows/nodejs.yml diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index 27947ea..0000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,15 +0,0 @@ -# .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/build_memory.yml b/.github/workflows/build_memory.yml new file mode 100644 index 0000000..fca34c9 --- /dev/null +++ b/.github/workflows/build_memory.yml @@ -0,0 +1,23 @@ +name: Build with 1GB + +on: [push] + +jobs: + build_and_test: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4.0.0 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - run: NODE_ENV=production pnpm i --frozen-lockfile + - run: NODE_ENV=production NODE_OPTIONS=--max-old-space-size=464 pnpm run build + - run: ls built/meta.json diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index cab313b..0000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,16 +0,0 @@ -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/nodejs.yml b/.github/workflows/nodejs.yml new file mode 100644 index 0000000..e4026a4 --- /dev/null +++ b/.github/workflows/nodejs.yml @@ -0,0 +1,38 @@ +name: Node.js CI + +on: [push] + +jobs: + build_and_test: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x] + + services: + mongo: + image: mongo:4.4-bionic + ports: + - 57010:27017 + redis: + image: redis:6.2-alpine + ports: + - 56310:6379 + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4.0.0 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + - run: node cli/diag-environment.js + - run: sudo apt-get update -y + - run: sudo apt-get install -y --no-install-recommends ffmpeg + - run: pnpm i --frozen-lockfile + - run: pnpm build + - run: ls built/meta.json + - run: cp test/test.yml .config/ + - run: pnpm test \ No newline at end of file