Skip to content

Commit

Permalink
Ci/release (#43)
Browse files Browse the repository at this point in the history
* Initial workflow for tests

* Add frontend tests

* Fix

* Fix

* Fix

* Set tag

* Fix

* Fix

* Fix

* Fix

* Fix

* Release

* Fix

* Fix

* Fix

* Fix

* Use official step

* Fix

* Clean code
  • Loading branch information
framebassman authored Aug 28, 2022
1 parent a21ad31 commit aa44dc2
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 55 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Release

on:
push:
branches: [ master ]

env:
VERSION: 1.2.${{ github.run_id }}

jobs:
Release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: framebassman
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Sentry Release
uses: getsentry/[email protected]
with:
finalize: false
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: kolenka-inc
SENTRY_PROJECT: izzy

- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: framebassman/izzy:${{ env.VERSION }}

- uses: avakar/tag-and-release@v1
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Sentry Release
uses: getsentry/[email protected]
with:
finalize: true
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: kolenka-inc
SENTRY_PROJECT: izzy
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Tests

on:
push:
pull_request:
branches: [ master ]
paths:
- '**.cs'
- '**.csproj'
- 'Izzy.Web/Client'

env:
DOTNET_VERSION: '3.1' # The .NET SDK version to use

jobs:
backend:
name: build-and-test-${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test Izzy.Web.Tests --no-restore --verbosity normal
frontend:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
working-directory: ./Izzy.Web/Client
- run: npm run build --if-present
working-directory: ./Izzy.Web/Client
- run: npm test
working-directory: ./Izzy.Web/Client
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.201-alpine3.11 AS build-env

RUN apk add --update 'nodejs=12.15.0-r1' 'npm=12.15.0-r1'
RUN apk add --update 'nodejs>12.15.0-r1' 'npm>12.15.0-r1'

COPY ./Izzy.Web /app
WORKDIR /app
Expand Down
1 change: 0 additions & 1 deletion Izzy.Web/Client/src/components/incomes/Incomes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { Component } from 'react';
import Button from '@material-ui/core/Button';
import FormControl from '@material-ui/core/FormControl';
import TextField from '@material-ui/core/TextField';
import Input from '@material-ui/core/Input';
import { Formik, Form, Field, FieldArray, FieldProps } from 'formik';
import './Person.css';
import { RandomPerson } from '../../store/model/RandomPerson';
Expand Down
1 change: 0 additions & 1 deletion Izzy.Web/Client/src/components/outcomes/Outcomes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import TableBody from '@material-ui/core/TableBody';
import TableCell from '@material-ui/core/TableCell';
import TableHead from '@material-ui/core/TableHead';
import TableRow from '@material-ui/core/TableRow';
import Button from '@material-ui/core/Button';
import FormControl from '@material-ui/core/FormControl';
import {Transfers} from './Transfers';

Expand Down

0 comments on commit aa44dc2

Please sign in to comment.