This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
Update main.yml #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fn Project Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Docker | |
uses: docker-practice/actions-setup-docker@master | |
- name: Install Fn Project CLI | |
run: | | |
curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh | |
- name: Start Fn Server | |
run: fn start & | |
- name: Create Fn App | |
run: fn create app goapp | |
- name: Deploy Fn App | |
run: fn --verbose deploy --app goapp --local | |
- name: Test Fn Function | |
run: | | |
echo -n '{"avatarJSON":"","size":512}' | fn invoke goapp render --content-type application/json | |
- name: Stop Fn Server | |
run: fn stop | |
if: always() |