Skip to content

Add logging for file path in your_program.sh and enhance GitHub Actio… #209

Add logging for file path in your_program.sh and enhance GitHub Actio…

Add logging for file path in your_program.sh and enhance GitHub Actio… #209

Workflow file for this run

name: Test
on: push
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.22.x
- name: Fetch latest release of Kafka && extract it
run: |
wget --progress=dot:giga https://media.githubusercontent.com/media/codecrafters-io/build-your-own-kafka/main/kafka_2.13-4.0.0-SNAPSHOT.tgz
tar -xzf kafka_2.13-4.0.0-SNAPSHOT.tgz
sudo mv kafka_2.13-4.0.0-SNAPSHOT/ /usr/local/kafka-latest
export PATH=$PATH:/usr/local/kafka-latest/bin
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.9"
- run: make test
- if: always()
run: |
# Find the latest file in /tmp/ directory that starts with "test-"
latest_file=$(ls -t /tmp/test-* | head -n1)
# Check if a file was found
if [ -n "$latest_file" ]; then
# Print the contents of the file
cat "$latest_file"
else
echo "No test file found in /tmp/ directory"
fi
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.22.x
- uses: dominikh/[email protected]
with:
version: "2024.1"
install-go: false