Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This is the auto import tool test #18260

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 226 additions & 0 deletions .github/workflows/auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
name: caseflow-auto
on:
push:
branches:
- gh-actions-yida

jobs:
# build_workspace:
# if: github.ref != 'refs/heads/gh-pages' && github.ref != 'refs/heads/main-gh-pages' && github.ref != 'refs/heads/gh-actions/make_docs-update_docs'
# runs-on: ubuntu-8-cores-latest
# container:
# image: node:12.3.0
# env:
# DBUS_SESSION_BUS_ADDRESS: "/dev/null"
# RAILS_ENV: test
# NODE_ENV: test
# steps:
# - uses: actions/checkout@v3.3.0
# - uses: "./.github/actions/install_node_dependencies"
# - name: Build webpack
# run: ~/project/ci-bin/capture-log "cd client && yarn build:test"
# - uses: actions/upload-artifact@v3.1.1
# with:
# path: "./."
demo:
if: github.ref != 'refs/heads/gh-pages' && github.ref != 'refs/heads/main-gh-pages' && github.ref != 'refs/heads/gh-actions/make_docs-update_docs'
runs-on: ubuntu-8-cores-latest
container:
image: '008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/cimg-ruby:2.7.3-browsers'
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
env:
DBUS_SESSION_BUS_ADDRESS: "/dev/null"
RAILS_ENV: test
NODE_ENV: test
BUNDLE_PATH: vendor/bundle
COVERAGE_DIR: "/home/circleci/coverage"
POSTGRES_HOST: localhost
POSTGRES_USER: root
services:
postgres:
image: postgres:11.7
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
POSTGRES_DB: caseflow_certification_test
facols:
image: '008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/facols:latest'
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
redis:
image: redis:4.0.10
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- name: Setup testfiles directory
run: ~/project/ci-bin/capture-log "mkdir -p ~/project/tmp/testfiles"
- uses: "./.github/actions/install_node_dependencies"
- uses: "./.github/actions/install_ruby_dependencies"
- uses: "./.github/actions/install_dockerize"
- uses: "./.github/actions/wait_for_databases"
- name: Database setup
run: |-
~/project/ci-bin/capture-log "DB=etl bundle exec rake db:create db:schema:load db:migrate"
~/project/ci-bin/capture-log "bundle exec rake db:create db:schema:load db:migrate"
- name: make seed-dbs
run: ~/project/ci-bin/capture-log "make -f Makefile.example seed-dbs"
- name: Assets Precompile
run: ~/project/ci-bin/capture-log "bundle exec rake assets:precompile"
- uses: actions/upload-artifact@v3
with:
path: "~/test-results"
- uses: actions/upload-artifact@v3
with:
path: "~/logs"
rspec:
if: github.ref != 'refs/heads/gh-pages' && github.ref != 'refs/heads/main-gh-pages' && github.ref != 'refs/heads/gh-actions/make_docs-update_docs'
runs-on: ubuntu-8-cores-latest
container:
image: '008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/cimg-ruby:2.7.3-browsers'
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
env:
DBUS_SESSION_BUS_ADDRESS: "/dev/null"
RAILS_ENV: test
NODE_ENV: test
BUNDLE_PATH: vendor/bundle
COVERAGE_DIR: "/home/circleci/coverage"
POSTGRES_HOST: localhost
POSTGRES_USER: root
services:
postgres:
image: postgres:11.7
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
POSTGRES_DB: caseflow_certification_test
facols:
image: '008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/facols:latest'
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
redis:
image: redis:4.0.10
# needs:
# - build_workspace
steps:
- uses: actions/download-artifact@v3
with:
path: "."
- name: Setup testfiles directory
run: ~/project/ci-bin/capture-log "mkdir -p ~/project/tmp/testfiles"
- uses: "./.github/actions/install_ruby_dependencies"
- uses: "./.github/actions/install_dockerize"
- uses: "./.github/actions/wait_for_databases"
- name: Database setup
run: |-
~/project/ci-bin/capture-log "DB=etl bundle exec rake db:create db:schema:load db:migrate:redo"
~/project/ci-bin/capture-log "bundle exec rake db:create db:schema:load db:migrate:redo"
- name: FACOLS test setup
run: ~/project/ci-bin/capture-log "bundle exec rake spec:setup_vacols"
- name: RSpec via knapsack_pro Queue Mode
run: |-
mkdir -p ~/test-results/rspec
export RAILS_ENV=test
bundle exec rake "knapsack_pro:queue:rspec[--format documentation --no-color --format RspecJunitFormatter --out tmp/rspec.xml]"
env:
KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES: true
- uses: actions/upload-artifact@v3
with:
path: "~/test-results"
- uses: actions/upload-artifact@v3
with:
path: "~/test-results"
- uses: actions/upload-artifact@v3
with:
path: "~/coverage"
- uses: actions/upload-artifact@v3
with:
path: "~/project/tmp/capybara"
- uses: actions/upload-artifact@v3.1.1
with:
path: "~/project/log/test.log"
- uses: actions/upload-artifact@v3.1.1
with:
path: "~/project/log/bullet.log"
- uses: actions/upload-artifact@v3.1.1
with:
path: "~/logs"
- name: Verify code coverage
run: ~/project/ci-bin/capture-log "bundle exec rake ci:circleci_verify_code_coverage"
# - name: Concatenate all logs
# run: "~/project/ci-bin/concatenate-log.rb >> ~/all_logs.log"
# if: always()
# - uses: actions/upload-artifact@v3.1.1
# with:
# path: "~/all_logs.log"
# - uses: actions/upload-artifact@v3.1.1
# with:
# path: "~/coverage/combined"
js_tests:
if: github.ref != 'refs/heads/gh-pages' && github.ref != 'refs/heads/main-gh-pages' && github.ref != 'refs/heads/gh-actions/make_docs-update_docs'
runs-on: ubuntu-latest
container:
image: cimg/ruby:2.7.3-browsers
env:
DBUS_SESSION_BUS_ADDRESS: "/dev/null"
NODE_ENV: test
JEST_DIR: "/home/circleci/test-results/jest"
TEST_REPORTER: jest-junit
JEST_JUNIT_OUTPUT_DIR: "/home/circleci/test-results/jest"
COVERAGE_DIR: "/home/circleci/coverage"
steps:
- uses: actions/checkout@v3
- name: Install python-2 as a node-gyp@3.8.0 dependency
run: |-
sudo apt-get update
sudo apt-get install -y python2
- uses: "./.github/actions/install_node_dependencies"
- name: Jest
run: |-
mkdir -p ~/test-results/jest
pushd client
~/project/ci-bin/capture-log "node_modules/.bin/jest --ci --reporters=default --reporters=jest-junit --maxWorkers=4"
- uses: actions/upload-artifact@v3
with:
path: "~/test-results"
- uses: actions/upload-artifact@v3
with:
path: "~/test-results"
# - name: Concatenate all logs
# run: "~/project/ci-bin/concatenate-log.rb >> ~/all_logs.log"
# if: always()
# - uses: actions/upload-artifact@v3.1.1
# with:
# path: "~/all_logs.log"
lint:
if: github.ref != 'refs/heads/gh-pages' && github.ref != 'refs/heads/main-gh-pages' && github.ref != 'refs/heads/gh-actions/make_docs-update_docs'
runs-on: ubuntu-latest
container:
image: '008577686731.dkr.ecr.us-gov-west-1.amazonaws.com/cimg-ruby:2.7.3-browsers'
credentials:
username: AWS
password: ${{ secrets.ECR_PASSWORD }}
env:
DBUS_SESSION_BUS_ADDRESS: "/dev/null"
steps:
- uses: actions/checkout@v3.3.0
- uses: "./.github/actions/install_ruby_dependencies"
- uses: "./.github/actions/install_node_dependencies"
- name: Danger
run: ~/project/ci-bin/capture-log "bundle exec danger"
- name: Lint
run: ~/project/ci-bin/capture-log "bundle exec rake lint"
- name: Security
run: ~/project/ci-bin/capture-log "bundle exec rake security"
# - name: Concatenate all logs
# run: "~/project/ci-bin/concatenate-log.rb >> ~/all_logs.log"
# if: always()
# - uses: actions/upload-artifact@v3.1.1
# with:
# path: "~/all_logs.log"