Skip to content

Instantly share code, notes, and snippets.

View fernandollisboa's full-sized avatar
📚

Fernando Lisboa fernandollisboa

📚
View GitHub Profile
name: Publish Docker image to Docker Hub
on:
pull_request: {}
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN}}
DOCKER_HUB_REGISTRY: fernandollisboa/checkout-captacao
DOCKER_IMAGE: checkout-captacao
# syntax=docker/dockerfile:1
FROM ruby:3.3.0
# Install nodejs
ENV NODE_VERSION 18.19.0
RUN ARCH=$(uname -m) \
&& if [ "$ARCH" = "aarch64" ]; then \
NODE_PACKAGE_URL="https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-arm64.tar.xz"; \
else \
NODE_PACKAGE_URL="https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz"; \
{
"id": "or_wZm04dxFkFL4nz6v",
"code": "EWPOIXI493",
"amount": 500000,
"currency": "BRL",
"closed": true,
"items": [
{
"id": "oi_KeGjYRrCQCPY4bJZ",
"type": "product",

Create Rails Project

  1. Run rails new
    rails new [name] --api -T
  2. Copy your Gemfile
  3. Copy your .gitignore
  4. Copy your .rubocop.yml
  5. Install Rspec
describe('catalog promotions', () => {
beforeEach(() => {
const credentials = ['sylius', 'sylius'];
cy.login(...credentials);
cy.clickInFirst('a[href="/admin/catalog-promotions/"]');
});
// Remove .only and implement others test cases!
it('shows of especify catalog promotion exposes the correct product and discount', () => {
// Select inactive promotions in search tab
cy.get('[id="criteria_state"]').select('Inactive');