diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2023-11-09 19:48:16 +0100 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2023-11-09 22:59:06 +0100 |
commit | 3f4a5564b2643d884594a15ddc233c9c4abe3780 (patch) | |
tree | 412583755cdbdad77326c17937462b20f9a0ad4c /.github | |
parent | aebb2fcd2551caa063c126a35dbb22ec72f2b616 (diff) | |
download | luasystem-3f4a5564b2643d884594a15ddc233c9c4abe3780.tar.gz luasystem-3f4a5564b2643d884594a15ddc233c9c4abe3780.tar.bz2 luasystem-3f4a5564b2643d884594a15ddc233c9c4abe3780.zip |
chore(ci): switch to github actions
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/lint.yml | 38 | ||||
-rw-r--r-- | .github/workflows/unix_build.yml | 59 |
2 files changed, 97 insertions, 0 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..4a4516b --- /dev/null +++ b/.github/workflows/lint.yml | |||
@@ -0,0 +1,38 @@ | |||
1 | name: Lint | ||
2 | |||
3 | concurrency: | ||
4 | # for PR's cancel the running task, if another commit is pushed | ||
5 | group: ${{ github.workflow }} ${{ github.ref }} | ||
6 | cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
7 | |||
8 | on: | ||
9 | # build on PR and push-to-main. This works for short-lived branches, and saves | ||
10 | # CPU cycles on duplicated tests. | ||
11 | # For long-lived branches that diverge, you'll want to run on all pushes, not | ||
12 | # just on push-to-main. | ||
13 | pull_request: {} | ||
14 | push: | ||
15 | branches: | ||
16 | - main | ||
17 | |||
18 | |||
19 | jobs: | ||
20 | lint: | ||
21 | runs-on: ubuntu-20.04 | ||
22 | steps: | ||
23 | - name: Checkout | ||
24 | uses: actions/checkout@v3 | ||
25 | |||
26 | - uses: leafo/gh-actions-lua@v8 | ||
27 | with: | ||
28 | luaVersion: "5.4" | ||
29 | |||
30 | - uses: leafo/gh-actions-luarocks@v4 | ||
31 | |||
32 | - name: dependencies | ||
33 | run: | | ||
34 | luarocks install luacheck | ||
35 | |||
36 | - name: lint | ||
37 | run: | | ||
38 | luacheck . | ||
diff --git a/.github/workflows/unix_build.yml b/.github/workflows/unix_build.yml new file mode 100644 index 0000000..ba8164a --- /dev/null +++ b/.github/workflows/unix_build.yml | |||
@@ -0,0 +1,59 @@ | |||
1 | name: "Unix build" | ||
2 | |||
3 | concurrency: | ||
4 | # for PR's cancel the running task, if another commit is pushed | ||
5 | group: ${{ github.workflow }} ${{ github.ref }} | ||
6 | cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
7 | |||
8 | on: | ||
9 | # build on PR and push-to-main. This works for short-lived branches, and saves | ||
10 | # CPU cycles on duplicated tests. | ||
11 | # For long-lived branches that diverge, you'll want to run on all pushes, not | ||
12 | # just on push-to-main. | ||
13 | pull_request: {} | ||
14 | push: | ||
15 | branches: | ||
16 | - main | ||
17 | |||
18 | |||
19 | jobs: | ||
20 | test: | ||
21 | runs-on: ${{ matrix.os }} | ||
22 | |||
23 | strategy: | ||
24 | fail-fast: false | ||
25 | matrix: | ||
26 | os: ['ubuntu-20.04', 'macos-11.0'] | ||
27 | luaVersion: | ||
28 | - "5.1" | ||
29 | - "5.2" | ||
30 | - "5.3" | ||
31 | - "5.4" | ||
32 | - "luajit-2.1.0-beta3" | ||
33 | - "luajit-openresty" | ||
34 | |||
35 | steps: | ||
36 | - name: Checkout | ||
37 | uses: actions/checkout@v3 | ||
38 | |||
39 | - uses: leafo/gh-actions-lua@v8 | ||
40 | with: | ||
41 | luaVersion: ${{ matrix.luaVersion }} | ||
42 | |||
43 | - uses: leafo/gh-actions-luarocks@v4 | ||
44 | |||
45 | - name: dependencies | ||
46 | run: | | ||
47 | luarocks install busted | ||
48 | luarocks make | ||
49 | |||
50 | - name: test | ||
51 | run: | | ||
52 | busted --Xoutput "--color" | ||
53 | |||
54 | # - name: Report test coverage | ||
55 | # if: success() | ||
56 | # continue-on-error: true | ||
57 | # run: luacov-coveralls | ||
58 | # env: | ||
59 | # COVERALLS_REPO_TOKEN: ${{ github.token }} | ||