|
4 | 4 | push: |
5 | 5 | pull_request: |
6 | 6 |
|
7 | | -env: |
8 | | - ROCK_NAME: "crud" |
9 | | - |
10 | 7 | jobs: |
11 | 8 | run-tests-ce: |
| 9 | + if: | |
| 10 | + github.event_name == 'push' || |
| 11 | + github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != 'tarantool' |
12 | 12 | strategy: |
13 | 13 | matrix: |
14 | 14 | tarantool-version: ["1.10", "2.3", "2.4", "2.5"] |
15 | 15 | fail-fast: false |
16 | 16 | runs-on: [ubuntu-latest] |
17 | 17 | steps: |
18 | 18 | - uses: actions/checkout@master |
| 19 | + |
19 | 20 | - name: Install requirements for community |
20 | 21 | run: | |
21 | 22 | curl -L https://tarantool.io/installer.sh | sudo VER=${{ matrix.tarantool-version }} bash |
22 | 23 | sudo apt install -y tarantool-dev |
23 | 24 | ./deps.sh |
| 25 | +
|
24 | 26 | - name: Run linter |
25 | 27 | run: .rocks/bin/luacheck . |
| 28 | + |
26 | 29 | - name: Run tests |
27 | 30 | run: .rocks/bin/luatest -v |
28 | 31 |
|
|
35 | 38 | runs-on: [ ubuntu-latest ] |
36 | 39 | steps: |
37 | 40 | - uses: actions/checkout@master |
| 41 | + |
38 | 42 | - name: Install requirements for enterprise |
39 | 43 | run: | |
40 | 44 | curl -O -L https://tarantool:${{ secrets.DOWNLOAD_TOKEN }}@download.tarantool.io/enterprise/tarantool-enterprise-bundle-${{ matrix.bundle_version }}.tar.gz |
|
43 | 47 | sudo cp tarantool-enterprise/tarantool /usr/bin/tarantool |
44 | 48 | source tarantool-enterprise/env.sh |
45 | 49 | ./deps.sh |
| 50 | +
|
46 | 51 | - name: Run linter |
47 | 52 | run: .rocks/bin/luacheck . |
| 53 | + |
48 | 54 | - name: Run tests |
49 | 55 | run: .rocks/bin/luatest -v |
50 | | - |
51 | | - push-rockspec: |
52 | | - runs-on: [ ubuntu-latest ] |
53 | | - steps: |
54 | | - - uses: actions/checkout@master |
55 | | - # https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions |
56 | | - - name: Set env |
57 | | - run: echo "GIT_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV |
58 | | - - name: Push scm rockspec |
59 | | - if: github.event_name == 'push' && github.ref == 'refs/heads/master' |
60 | | - run: | |
61 | | - curl --fail -X PUT -F rockspec=@$ROCK_NAME-scm-1.rockspec \ |
62 | | - https://${{ secrets.ROCKS_USERNAME }}:${{ secrets.ROCKS_PASSWORD }}@${{ secrets.ROCKS_SERVER }} |
63 | | - - name: Push release rockspec |
64 | | - if: startsWith(github.ref, 'refs/tags') |
65 | | - run: | |
66 | | - curl --fail -X PUT -F rockspec=@$ROCK_NAME-scm-1.rockspec \ |
67 | | - https://${{ secrets.ROCKS_USERNAME }}:${{ secrets.ROCKS_PASSWORD }}@${{ secrets.ROCKS_SERVER }} \ |
68 | | - cat $ROCK_NAME-scm-1.rockspec | |
69 | | - sed -E \ |
70 | | - -e "s/branch = '.+'/tag = '${GIT_TAG}'/g" \ |
71 | | - -e "s/version = '.+'/version = '${GIT_TAG}-1'/g" | |
72 | | - curl --fail -X PUT -F "rockspec=@-;filename=$ROCK_NAME-${GIT_TAG}-1.rockspec" \ |
73 | | - https://${{ secrets.ROCKS_USERNAME }}:${{ secrets.ROCKS_PASSWORD }}@rocks.tarantool.org |
0 commit comments