commit
					46ba209428
				
				 3 changed files with 97 additions and 0 deletions
			
			
		@ -0,0 +1,70 @@
					 | 
				
			||||
# This is a basic workflow to help you get started with Actions | 
				
			||||
 | 
				
			||||
name: CI | 
				
			||||
 | 
				
			||||
# Controls when the workflow will run | 
				
			||||
on: | 
				
			||||
  # Triggers the workflow on push or pull request events but only for the "main" branch | 
				
			||||
  push: | 
				
			||||
    branches: [ "main" ] | 
				
			||||
  pull_request: | 
				
			||||
    branches: [ "main" ] | 
				
			||||
 | 
				
			||||
  # Allows you to run this workflow manually from the Actions tab | 
				
			||||
  workflow_dispatch: | 
				
			||||
 | 
				
			||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | 
				
			||||
jobs: | 
				
			||||
  # This workflow contains a single job called "build" | 
				
			||||
  build: | 
				
			||||
    # The type of runner that the job will run on | 
				
			||||
    runs-on: ubuntu-latest | 
				
			||||
 | 
				
			||||
    # Steps represent a sequence of tasks that will be executed as part of the job | 
				
			||||
    steps: | 
				
			||||
      - name: Create dir for binaries | 
				
			||||
        run: mkdir builds | 
				
			||||
 | 
				
			||||
      - name: Download DSP binary | 
				
			||||
        run: curl -o builds/dsp https://dummy-dsp.s3.eu-central-1.amazonaws.com/dsp | 
				
			||||
 | 
				
			||||
      - name: Making it executable | 
				
			||||
        run: chmod +x builds/dsp | 
				
			||||
 | 
				
			||||
      - name: Download tests binary | 
				
			||||
        run: curl -o builds/tests https://dummy-dsp.s3.eu-central-1.amazonaws.com/tests | 
				
			||||
 | 
				
			||||
      - name: Making it executable | 
				
			||||
        run: chmod +x builds/tests | 
				
			||||
 | 
				
			||||
      # your code must be built into builds/ssp binary | 
				
			||||
      - name: Build SSP binary | 
				
			||||
        run: echo Ain\'t no ssp yet | 
				
			||||
 | 
				
			||||
      #- name: Making it executable | 
				
			||||
      #  run: chmod +x builds/ssp | 
				
			||||
 | 
				
			||||
      # run a battery of tests | 
				
			||||
      - name: happy path | 
				
			||||
        run: ./builds/tests -test.run Test_HappyPath | 
				
			||||
 | 
				
			||||
      - name: not totally happy path, easy difficulty | 
				
			||||
        run: ./builds/tests -test.run Test_LessHappyEasy | 
				
			||||
 | 
				
			||||
      - name: not totally happy path, medium difficulty | 
				
			||||
        run: ./builds/tests -test.run Test_LessHappyMedium | 
				
			||||
 | 
				
			||||
      - name: not totally happy path, hard difficulty | 
				
			||||
        run: ./builds/tests -test.run Test_LessHappyHard | 
				
			||||
 | 
				
			||||
      - name: not happy at all, easy difficulty | 
				
			||||
        run: ./builds/tests -test.run Test_NotHappyEasy | 
				
			||||
 | 
				
			||||
      - name: not happy at all, medium difficulty | 
				
			||||
        run: ./builds/tests -test.run Test_NotHappyMedium | 
				
			||||
 | 
				
			||||
      - name: not happy at all, hard difficulty | 
				
			||||
        run: ./builds/tests -test.run Test_NotHappyHard | 
				
			||||
 | 
				
			||||
      - name: not happy at all, hardcore difficulty | 
				
			||||
        run: ./builds/tests -test.run Test_NotHappyHardcore | 
				
			||||
@ -0,0 +1,19 @@
					 | 
				
			||||
# Binaries for programs and plugins | 
				
			||||
*.exe | 
				
			||||
*.exe~ | 
				
			||||
*.dll | 
				
			||||
*.so | 
				
			||||
*.dylib | 
				
			||||
 | 
				
			||||
# Test binary, built with `go test -c` | 
				
			||||
*.test | 
				
			||||
 | 
				
			||||
# Output of the go coverage tool, specifically when used with LiteIDE | 
				
			||||
*.out | 
				
			||||
 | 
				
			||||
# Dependency directories (remove the comment below to include it) | 
				
			||||
vendor/ | 
				
			||||
 | 
				
			||||
# IDEs directories | 
				
			||||
.idea | 
				
			||||
.vscode | 
				
			||||
@ -0,0 +1,8 @@
					 | 
				
			||||
Репозиторий с настроенными тестами задания на вакансию Go Junior Developer. | 
				
			||||
 | 
				
			||||
Вам нужно: | 
				
			||||
- создать новый репозиторий, используя этот как шаблон (зелёная кнопка Use this template) | 
				
			||||
- чуть-чуть поправить файл `.github/workflows/runtests.yml` - добавить в него команду сборки бинарника вашего решения, так, чтобы он оказался по пути `builds/ssp` | 
				
			||||
- раскомментировать строчки в воркфлоу, которые разрешают запускать builds/ssp | 
				
			||||
 | 
				
			||||
Дальше, по идее, можно наслаждаться тестами при каждом обновлении кода в ветке `main` | 
				
			||||
					Loading…
					
					
				
		Reference in new issue