Compare commits

...
Author SHA1 Message Date
Shivam Mishra 1539e72586 chore(ci): update yarn cache 2024-01-24 15:07:46 +05:30
+48 -36
View File
@@ -21,7 +21,7 @@ jobs:
image: postgres:15.3 image: postgres:15.3
env: env:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: "" POSTGRES_PASSWORD: ''
POSTGRES_DB: postgres POSTGRES_DB: postgres
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
ports: ports:
@@ -41,47 +41,59 @@ jobs:
options: --entrypoint redis-server options: --entrypoint redis-server
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.ref }} ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }} repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: ruby/setup-ruby@v1 - uses: ruby/setup-ruby@v1
with: with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 20 node-version: 20
cache: yarn cache: yarn
- name: yarn - name: Get yarn cache directory path
run: yarn install id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Strip enterprise code - name: Cache yarn dependencies
run: | uses: actions/cache@v2
rm -rf enterprise with:
rm -rf spec/enterprise path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Create database - name: yarn
run: bundle exec rake db:create run: yarn install
- name: Seed database - name: Strip enterprise code
run: bundle exec rake db:schema:load run: |
rm -rf enterprise
rm -rf spec/enterprise
- name: yarn check-files - name: Create database
run: yarn install --check-files run: bundle exec rake db:create
# Run rails tests - name: Seed database
- name: Run backend tests run: bundle exec rake db:schema:load
run: |
bundle exec rspec --profile=10 --format documentation
env:
NODE_OPTIONS: --openssl-legacy-provider
- name: Upload rails log folder - name: yarn check-files
uses: actions/upload-artifact@v3 run: yarn install --check-files
if: always()
with: # Run rails tests
name: rails-log-folder - name: Run backend tests
path: log run: |
bundle exec rspec --profile=10 --format documentation
env:
NODE_OPTIONS: --openssl-legacy-provider
- name: Upload rails log folder
uses: actions/upload-artifact@v3
if: always()
with:
name: rails-log-folder
path: log