-
-
Notifications
You must be signed in to change notification settings - Fork 30
40 lines (34 loc) · 1.08 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Test
on:
pull_request:
branches: [master]
workflow_dispatch:
env:
FONTAWESOME_TOKEN: ${{ secrets.FONTAWESOME_TOKEN }}
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test
run: |
set -ex
swift test
(cd Resources/parsers/50800 && swift test)
(cd Resources/parsers/50900 && swift test)
(cd Resources/parsers/51000 && swift test)
(cd Resources/parsers/60000 && swift test)
(cd Resources/parsers/trunk && swift test)
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
run: |
set -ex
IMAGE_TAG=swiftfiddle/swift-ast-explorer.com:latest
docker build --rm --no-cache --build-arg FONTAWESOME_TOKEN=${{ env.FONTAWESOME_TOKEN }} --tag ${IMAGE_TAG} .
docker push ${IMAGE_TAG}