+ci/cd: main.yml +test: main_test.go #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - main # Запускать пайплайн при пуше в ветку main | |
| pull_request: | |
| branches: | |
| - main # Запускать пайплайн при создании пул-реквеста в ветку main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.22' # Указываем версию Go | |
| - name: Run tests | |
| run: | | |
| cd go/test | |
| go test -v ./... |