This commit is contained in:
55
.github/workflows/main.yml
vendored
55
.github/workflows/main.yml
vendored
@@ -7,48 +7,17 @@ on:
|
||||
branches: [ master, develop, main ]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
# services:
|
||||
# db:
|
||||
# image: postgres:11
|
||||
# ports: ['5432:5432']
|
||||
#
|
||||
container-test-job:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container:
|
||||
image: node:18
|
||||
env:
|
||||
NODE_ENV: development
|
||||
ports:
|
||||
- 80
|
||||
volumes:
|
||||
- my_docker_volume:/volume_mount
|
||||
options: --cpus 1
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1.171.0
|
||||
with:
|
||||
ruby-version: 3.3.0
|
||||
self-hosted: true
|
||||
|
||||
- uses: Borales/actions-yarn@v2.3.0
|
||||
with:
|
||||
cmd: install
|
||||
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
# sudo apt install -yqq libpq-dev
|
||||
gem install bundler
|
||||
|
||||
- name: Install Gems
|
||||
run: |
|
||||
bundle install
|
||||
|
||||
- name: Prepare Database
|
||||
run: |
|
||||
bundle exec rails db:prepare
|
||||
|
||||
- name: Run Tests
|
||||
# env:
|
||||
# DATABASE_URL: postgres://postgres:@localhost:5432/databasename
|
||||
# RAILS_MASTER_KEY: ${{secrets.RAILS_MASTER_KEY}}
|
||||
run: |
|
||||
bundle exec rails test
|
||||
|
||||
- name: Create Coverage Artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: code-coverage
|
||||
path: coverage/
|
||||
- name: Check for dockerenv file
|
||||
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
|
||||
Reference in New Issue
Block a user