Added Task Filtering tests #42
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
| name: hexlet-check | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| tags: | |
| - '**' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Hexlet project check | |
| uses: hexlet/project-action@release | |
| with: | |
| hexlet-id: ${{ secrets.HEXLET_ID }} | |
| - name: Retrieve test artifacts | |
| if: ${{ always() }} | |
| run: | | |
| mkdir -p tmp/artifacts | |
| if docker compose -f docker-compose.yml cp app:/project/tmp/artifacts tmp/artifacts; then | |
| echo "Artifacts copied via docker-compose cp" | |
| else | |
| echo "docker-compose cp failed, attempting fallback via docker ps + docker cp" | |
| CONTAINER_ID=$(docker ps -aq --filter "name=source-app-1") | |
| if [ -n "$CONTAINER_ID" ]; then | |
| docker cp "${CONTAINER_ID}":/project/tmp/artifacts tmp/artifacts \ | |
| && echo "Artifacts copied via docker cp" | |
| else | |
| echo "Container 'source-app-1' not found" | |
| fi | |
| fi | |
| - name: Upload test artifacts | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-artifacts | |
| path: tmp/artifacts |