From 31c3ee13eea0e28b32d5fb0fbc434ac71585045c Mon Sep 17 00:00:00 2001 From: behnamdosti1189-lab Date: Tue, 11 Aug 2026 11:38:32 +0330 Subject: [PATCH] Create Upload files --- Upload files | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Upload files diff --git a/Upload files b/Upload files new file mode 100644 index 000000000..2586c41b5 --- /dev/null +++ b/Upload files @@ -0,0 +1,51 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# +# This workflow will install a prebuilt Ruby version, install dependencies, and +# run tests and linters. +name: "Ruby on Rails CI" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + test: + runs-on: ubuntu-latest + + services: + postgres: + image: postgres:11-alpine + ports: + - "5432:5432" + env: + POSTGRES_DB: rails_test + POSTGRES_USER: rails + POSTGRES_PASSWORD: password + + env: + RAILS_ENV: test + DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test" + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Ruby and gems + uses: ruby/setup-ruby@v1 + with: + # ⚠️ '3.2.2' '3.1.0., + ruby-version: '3.2' + bundler-cache: true + + - name: Set up database schema + run: | + bin/rails db:create + bin/rails db:schema:load + + - name: Run tests + run: bin/rails test