Skip to content

Ensure lowercase docker image name #2

Ensure lowercase docker image name

Ensure lowercase docker image name #2

Workflow file for this run

name: Linting and Tests
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Create build image name
run: |
echo "IMAGENAME_LC=${IMAGENAME,,}" >> ${GITHUB_ENV}
env:
IMAGENAME: '${{ github.repository }}'
- name: Build the Docker image
run: docker build .docker/alpine/ --tag ${IMAGENAME_LC}-test:lua-5.2
- name: Run linter
uses: addnab/docker-run-action@v3
with:
image: ${{ env.IMAGENAME_LC }}-test:lua-5.2
options: -v ${{ github.workspace }}:/github/workspace
run: |
echo "Static luacheck ljsocket.lua"
luacheck --config .luacheckrc \
ljsocket.lua
echo "Linting ljsocket.lua"
lualint -s ljsocket.lua
- name: Bytecode verification
uses: addnab/docker-run-action@v3
with:
image: ${{ env.IMAGENAME_LC }}-test:lua-5.2
options: -v ${{ github.workspace }}:/github/workspace
run: |
echo "Checking JIT bytecode for ljsocket.lua"
luajit -bl ljsocket.lua /dev/null
echo "Checking bytecode for ljsocket.lua"
luac -p ljsocket.lua
- name: Run unit tests
uses: addnab/docker-run-action@v3
with:
image: ${{ env.IMAGENAME_LC }}-test:lua-5.2
options: -v ${{ github.workspace }}:/github/workspace
run: |
lunit -i `which luajit` $(find test -name "*_test.lua")
luacov ljsocket.lua