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

Revise the config to generate the project for --api accordingly #417

Closed
hoangnguyen92dn opened this issue Jun 23, 2023 · 0 comments · Fixed by #455
Closed

Revise the config to generate the project for --api accordingly #417

hoangnguyen92dn opened this issue Jun 23, 2023 · 0 comments · Fixed by #455
Assignees

Comments

@hoangnguyen92dn
Copy link

Why

There is a similar issue (#107) logged for long time ago.

I had to remove unnecessary files mostly for the UI part since generating an API project from rails-templates; in order to make the novice developers happy 🤟 and ready for development 🧑‍💻 👩‍💻 We would need to handle:

  • Because the API application doesn't add UI tests so we could remove steps/actions from workflows/test.yml:
    • System tests

system_tests:
name: System tests
runs-on: ubuntu-latest
needs: build
timeout-minutes: 15
env:
TEST_RETRY: 2
steps:
- uses: actions/checkout@v3
- name: Set env BRANCH_TAG
uses: nimblehq/branch-tag-action@1
- name: Login to Docker registry
uses: docker/login-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY_HOST }}
username: ${{ env.DOCKER_REGISTRY_USERNAME }}
password: ${{ env.DOCKER_REGISTRY_TOKEN }}
- name: Pull Docker image
run: docker-compose pull test || true
- name: Run system tests
run: docker-compose run test bundle exec rspec spec/systems --profile --format progress
- name: Upload system tests screenshots artifact
uses: actions/upload-artifact@v2
if: ${{ failure() }}
with:
name: system_tests_screenshots
path: tmp/screenshots/

  • Setup Node

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'yarn'
- name: Cache Node modules
id: node-modules-cache
uses: actions/cache@v3
with:
path: node_modules
key: ${{ runner.os }}-nodemodules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-nodemodules-
- name: Yarn install
if: steps.node-modules-cache.outputs.cache-hit != 'true'
run: yarn

  • Get rid of yarn commands in Makefile:

install-dependencies:
bundle install
yarn install
codebase:
rubocop
yarn codebase
codebase/fix:
rubocop -a
yarn codebase:fix

  • Update the branches in workflows, the default branches don't match the convention the team is following.

branches-ignore:
- master
- main
- development

branches:
- master
- main
- development

Who Benefits?

Developers

@sanG-github sanG-github self-assigned this Aug 3, 2023
sanG-github added a commit that referenced this issue Aug 4, 2023
sanG-github added a commit that referenced this issue Aug 4, 2023
sanG-github added a commit that referenced this issue Aug 4, 2023
sanG-github added a commit that referenced this issue Aug 11, 2023
sanG-github added a commit that referenced this issue Aug 18, 2023
sanG-github added a commit that referenced this issue Sep 21, 2023
sanG-github added a commit that referenced this issue Sep 21, 2023
sanG-github added a commit that referenced this issue Sep 21, 2023
sanG-github added a commit that referenced this issue Sep 21, 2023
sanG-github added a commit that referenced this issue Sep 21, 2023
github-merge-queue bot pushed a commit that referenced this issue Sep 26, 2023
…gly (#455)

* [#417] Change deprecated option

* [#417] Update files by variant

* [#417] Resolve rubocop warning

* [#417] Remove failed test

* [#417] Update tests
@malparty malparty mentioned this issue Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants