added caching
This commit is contained in:
parent
ea726ced89
commit
236dd62265
3 changed files with 33 additions and 11 deletions
|
@ -10,15 +10,16 @@ on:
|
|||
|
||||
jobs:
|
||||
luacheck_errcheck:
|
||||
runs-on: docker
|
||||
container: nickblah/lua:5.1-luarocks-alpine
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Install Lua and Luarocks
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y lua5.1 luarocks
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install C libraries
|
||||
run: apk add build-base
|
||||
|
||||
- name: Install Luacheck
|
||||
run: luarocks install luacheck
|
||||
|
||||
|
|
|
@ -10,15 +10,35 @@ on:
|
|||
|
||||
jobs:
|
||||
busted_unit_test:
|
||||
runs-on: docker
|
||||
container: nickblah/lua:5.1-luarocks-alpine
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Cache all installation files for faster workflow
|
||||
- name: Cache Lua
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
/usr/lib/lua
|
||||
/usr/local/lib/lua
|
||||
/usr/local/share/lua
|
||||
/usr/bin/lua
|
||||
key: lua
|
||||
|
||||
- name: Cache Luarocks
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
/usr/local/bin/luarocks
|
||||
/usr/local/share/lua/5.1/luarocks
|
||||
key: luarocks
|
||||
|
||||
- name: Install Lua and Luarocks
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y lua5.1 luarocks
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install C libraries
|
||||
run: apk add build-base
|
||||
|
||||
- name: Install Busted
|
||||
run: luarocks install busted
|
||||
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
|
||||
outputs = { self, nixpkgs, ...}:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit self; };
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
in {
|
||||
|
||||
devShells.x86_64-linux.default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
# Run CI/CD actions locally
|
||||
|
|
Loading…
Add table
Reference in a new issue