From 27f9b67782fc11e9deb8154a91ceb4cf7e0e4b37 Mon Sep 17 00:00:00 2001 From: Alfredo Gallardo Date: Tue, 2 Jul 2024 13:10:55 -0400 Subject: [PATCH] - feature: added pr check --- .github/workflows/pr-check.yml | 48 +++++++++++++++++++++++ .github/workflows/release-development.yml | 4 +- 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pr-check.yml diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml new file mode 100644 index 0000000..07c49bf --- /dev/null +++ b/.github/workflows/pr-check.yml @@ -0,0 +1,48 @@ +name: PR Check + +on: + pull_request: + branches: [main] + +defaults: + run: + working-directory: ./ + +jobs: + check: + runs-on: ubuntu-22.04 + environment: development + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node version + uses: actions/setup-node@v3 + with: + node-version: 20.14.0 + check-latest: false + registry-url: https://registry.npmjs.org + cache: 'npm' + cache-dependency-path: package-lock.json + + - name: Cache cargo assets + id: cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: build-cargo-${{ hashFiles('**/Cargo.lock') }} + + - name: Install dependencies + run: | + npm cache verify + npm ci --no-audit --prefer-offline + + - name: Run NX publish + run: npx nx run-many -t lint,test --verbose diff --git a/.github/workflows/release-development.yml b/.github/workflows/release-development.yml index 6984600..b2ed8b0 100644 --- a/.github/workflows/release-development.yml +++ b/.github/workflows/release-development.yml @@ -10,7 +10,7 @@ defaults: jobs: prebuild: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 outputs: version: ${{ steps.package-version.outputs.version }} steps: @@ -25,7 +25,7 @@ jobs: publish-libraries: needs: prebuild - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 environment: development steps: - name: Check out repository