From 07b5290545d4deb212f25b323a600e549417d8b4 Mon Sep 17 00:00:00 2001 From: Maximo Mussini Date: Wed, 25 Sep 2024 16:50:21 -0300 Subject: [PATCH] chore: consolidate workflows --- .github/workflows/crawl.yml | 2 +- .github/workflows/js.yml | 37 ---------------- .../{ruby.yml => js_from_routes.yml} | 44 +++++++++++++++++-- .github/workflows/lint.yml | 24 ---------- 4 files changed, 42 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/js.yml rename .github/workflows/{ruby.yml => js_from_routes.yml} (68%) delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/crawl.yml b/.github/workflows/crawl.yml index 36b8ecb..0215a9d 100644 --- a/.github/workflows/crawl.yml +++ b/.github/workflows/crawl.yml @@ -19,7 +19,7 @@ jobs: uses: whatnick/wait-action@master with: time: '50s' - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - run: 'sudo apt-get install -y jq' - run: 'echo "CONFIG=$(cat docs/.algolia/config.json | jq -r tostring)" >> $GITHUB_ENV' - run: "cd /root && pipenv install" diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml deleted file mode 100644 index 7371c6a..0000000 --- a/.github/workflows/js.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: js - -on: - push: - branches: - - main - pull_request: - branches: - - '**' - -jobs: - js: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v4.0.0 - with: - version: 9.8.0 - - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: 18.x - cache: 'pnpm' - - - run: pnpm install --frozen-lockfile - - - name: Build - run: pnpm build - - - name: Lint - run: pnpm lint - - - name: Test - run: pnpm test diff --git a/.github/workflows/ruby.yml b/.github/workflows/js_from_routes.yml similarity index 68% rename from .github/workflows/ruby.yml rename to .github/workflows/js_from_routes.yml index 091c02d..470a1ab 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/js_from_routes.yml @@ -1,4 +1,4 @@ -name: build +name: JS From Routes on: push: @@ -9,8 +9,7 @@ on: - '**' jobs: - build: - name: build + rspec: runs-on: ${{ matrix.os }} continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' || matrix.experimental }} strategy: @@ -61,3 +60,42 @@ jobs: run: | export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}" ./cc-test-reporter after-build -r ${{secrets.CC_TEST_REPORTER_ID}} + + rubocop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3.5" + bundler-cache: true + + - name: Ruby linter + run: bundle exec standardrb + + js: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4.0.0 + with: + version: 9.8.0 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 18.x + cache: 'pnpm' + + - run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm build + + - name: Lint + run: pnpm lint + + - name: Test + run: pnpm test diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 6cde151..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: lint - -on: - push: - branches: - - main - pull_request: - branches: - - '**' - -jobs: - build: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: ruby/setup-ruby@v1 - with: - ruby-version: "3.3.5" - bundler-cache: true - - - name: Ruby linter - run: bundle exec standardrb