modif test #3
Workflow file for this run
This file contains 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
name: vérification du client | |
on: | |
push: | |
branches: | |
- 14-create-create-CI-CD | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- name: Checkout du code | |
uses: actions/checkout@v2 | |
- name: Installer Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21.6 | |
- name: Installer les dépendances Go | |
run: go get -v -t -d ./... | |
- name: Display Go version | |
run: go version | |
- name: Afficher les versions des dépendances | |
run: go list -m -json all | jq '.[] | .Path + " " + .Version' | |
- name: Exécuter main.go | |
id: main | |
run: go run main.go | |
verify: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
steps: | |
- name: Vérifier qu'il n'y a pas eu d'erreur | |
run: | | |
if [ "${{ needs.build.outputs.run-main }}" == "success" ]; then | |
echo "Le fichier main.go s'est exécuté sans erreur." | |
else | |
echo "Le fichier main.go a rencontré des erreurs." | |
exit 1 | |
fi |